mirror of https://github.com/zulip/zulip.git
Add "client" string to Nagios integration.
(imported from commit 0e42d297b5be668da9b28c9970621a1f9a4229ca)
This commit is contained in:
parent
a4111a2426
commit
b815203b0b
|
@ -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 New Issue