4 from nacoma
.hooks
import Change
6 reportable_types
= ['host', 'service', 'hostgroup', 'servicegroup']
10 if change
.type not in reportable_types
:
12 if change
.is_renamed():
13 output
= subprocess
.Popen(['/usr/bin/php', '/opt/monitor/op5/ninja/index.php', 'cli/handle_rename/%s/%s/%s' % (change
.type, change
.oldname
, change
.newname
)], stdout
=subprocess
.PIPE
).communicate()[0]
14 elif change
.is_deleted():
15 output
= subprocess
.Popen(['/usr/bin/php', '/opt/monitor/op5/ninja/index.php', 'cli/handle_deletion/%s/%s' % (change
.type, change
.oldname
)], stdout
=subprocess
.PIPE
).communicate()[0]