Add "client" string to Nagios integration.
(imported from commit 0e42d297b5be668da9b28c9970621a1f9a4229ca)
This commit is contained in:
parent
2240a03c9e
commit
7345a878e9
|
@ -2,6 +2,7 @@
|
||||||
import optparse
|
import optparse
|
||||||
import zulip
|
import zulip
|
||||||
|
|
||||||
|
VERSION = "0.9"
|
||||||
# Nagios passes the notification details as command line options.
|
# Nagios passes the notification details as command line options.
|
||||||
# In Nagios, "output" means "first line of output", and "long
|
# In Nagios, "output" means "first line of output", and "long
|
||||||
# output" means "other lines of output".
|
# output" means "other lines of output".
|
||||||
|
@ -14,7 +15,7 @@ for opt in ('type', 'host', 'service', 'state'):
|
||||||
parser.add_option('--' + opt)
|
parser.add_option('--' + opt)
|
||||||
(opts, args) = parser.parse_args()
|
(opts, args) = parser.parse_args()
|
||||||
|
|
||||||
client = zulip.Client(config_file=opts.config)
|
client = zulip.Client(config_file=opts.config, client="nagios " + VERSION)
|
||||||
|
|
||||||
msg = dict(type='stream', to=opts.stream)
|
msg = dict(type='stream', to=opts.stream)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue