Discussion:
[Nagios-users] nagios alert messages not appearing in hipchat chat window.
Kaushal Shriyan
2013-07-26 14:33:53 UTC
Permalink
Hi,

Thanks for the reply. I have put the below entries in nagios commands.cfg
file I am running Nagios 3.4.4 on CentOS 6.4.

define command {
command_name notify-host-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=host
--inputs="$HOSTNAME$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$HOSTSTATE$|$HOSTOUTPUT$"
-n
}
define command {
command_name notify-service-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=service
--inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$"
-n
}

I am unable to see any nagios alert messages in hipchat window. Please let
me know if anyone needs more information.

Regards,

Kaushal
Kaushal Shriyan
2013-07-27 09:38:35 UTC
Permalink
On Fri, Jul 26, 2013 at 8:03 PM, Kaushal Shriyan
Post by Kaushal Shriyan
Hi,
Thanks for the reply. I have put the below entries in nagios commands.cfg
file I am running Nagios 3.4.4 on CentOS 6.4.
define command {
command_name notify-host-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=host
--inputs="$HOSTNAME$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$HOSTSTATE$|$HOSTOUTPUT$"
-n
}
define command {
command_name notify-service-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=service
--inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$"
-n
}
I am unable to see any nagios alert messages in hipchat window. Please let
me know if anyone needs more information.
Regards,
Kaushal
Hi,

Checking in again for my earlier post to this mailing list. Any suggestions
please?

Regards,

Kaushal
Giles Coochey
2013-07-28 07:57:49 UTC
Permalink
Post by Kaushal Shriyan
On Fri, Jul 26, 2013 at 8:03 PM, Kaushal Shriyan
Hi,
Thanks for the reply. I have put the below entries in nagios
commands.cfg file I am running Nagios 3.4.4 on CentOS 6.4.
define command {
command_name notify-host-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=host
--inputs="$HOSTNAME$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$HOSTSTATE$|$HOSTOUTPUT$"
-n
}
define command {
command_name notify-service-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=service
--inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$"
-n
}
I am unable to see any nagios alert messages in hipchat window.
Please let me know if anyone needs more information.
Regards,
Kaushal
Hi,
Checking in again for my earlier post to this mailing list. Any
suggestions please?
Regards,
Kaushal
Have you tried running the command manually on the command line as the
nagios user?
--
Regards,

Giles Coochey, CCNP, CCNA, CCNAS
NetSecSpec Ltd
+44 (0) 8444 780677
+44 (0) 7983 877438
http://www.coochey.net
http://www.netsecspec.co.uk
***@coochey.net
Kaushal Shriyan
2013-07-31 15:21:16 UTC
Permalink
Post by Kaushal Shriyan
Post by Kaushal Shriyan
Hi,
Thanks for the reply. I have put the below entries in nagios commands.cfg
file I am running Nagios 3.4.4 on CentOS 6.4.
define command {
command_name notify-host-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=host
--inputs="$HOSTNAME$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$HOSTSTATE$|$HOSTOUTPUT$"
-n
}
define command {
command_name notify-service-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=service
--inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$"
-n
}
I am unable to see any nagios alert messages in hipchat window. Please
let me know if anyone needs more information.
Regards,
Kaushal
Hi,
Checking in again for my earlier post to this mailing list. Any
suggestions please?
Regards,
Kaushal
Have you tried running the command manually on the command line as the
nagios user?
Hi Giles Coochey,

Apologies for the delay in replying the email.

/usr/bin/hipsaint --token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307
--type=service
--inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$"

when i run the below command replacing all macros, I get the below issue.
[***@nagios ~]$ id
uid=502(nagios) gid=502(nagios) groups=502(nagios),503(nagcmd)
[***@nagios ~]$ /usr/bin/hipsaint --token=c29bab160e8e6a4f3ca39ba6fe7c1d
--room=67307 --type=service --inputs="Main Website solr Wed Jul 31
20:42:28 IST 2013 Recovery 192.168.70.15 Recovery Ping OK"
Traceback (most recent call last):
File "/usr/bin/hipsaint", line 9, in <module>
load_entry_point('hipsaint==0.4', 'console_scripts', 'hipsaint')()
File
"/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/bin/commands.py",
line 55, in main
msg.deliver_payload()
File
"/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/messages.py",
line 29, in deliver_payload
message_body = self.render_message()
File
"/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/messages.py",
line 56, in render_message
servicedesc, hostalias, timestamp, ntype, hostaddress, state,
serviceoutput = self.inputs.split('|')
ValueError: need more than 1 value to unpack
[***@nagios ~]$

Please let me know if you need more information.

Regards

Kaushal
Giles Coochey
2013-08-02 13:56:18 UTC
Permalink
Post by Giles Coochey
Post by Kaushal Shriyan
On Fri, Jul 26, 2013 at 8:03 PM, Kaushal Shriyan
Hi,
Thanks for the reply. I have put the below entries in nagios
commands.cfg file I am running Nagios 3.4.4 on CentOS 6.4.
define command {
command_name notify-host-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=host
--inputs="$HOSTNAME$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$HOSTSTATE$|$HOSTOUTPUT$"
-n
}
define command {
command_name notify-service-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307
--type=service
--inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$"
-n
}
I am unable to see any nagios alert messages in hipchat
window. Please let me know if anyone needs more information.
Regards,
Kaushal
Hi,
Checking in again for my earlier post to this mailing list. Any
suggestions please?
Regards,
Kaushal
Have you tried running the command manually on the command line as
the nagios user?
Hi Giles Coochey,
Apologies for the delay in replying the email.
/usr/bin/hipsaint --token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307
--type=service
--inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$"
when i run the below command replacing all macros, I get the below issue.
uid=502(nagios) gid=502(nagios) groups=502(nagios),503(nagcmd)
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=service
--inputs="Main Website solr Wed Jul 31 20:42:28 IST 2013 Recovery
192.168.70.15 Recovery Ping OK"
File "/usr/bin/hipsaint", line 9, in <module>
load_entry_point('hipsaint==0.4', 'console_scripts', 'hipsaint')()
File
"/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/bin/commands.py",
line 55, in main
msg.deliver_payload()
File
"/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/messages.py",
line 29, in deliver_payload
message_body = self.render_message()
File
"/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/messages.py",
line 56, in render_message
servicedesc, hostalias, timestamp, ntype, hostaddress, state,
serviceoutput = self.inputs.split('|')
ValueError: need more than 1 value to unpack
Please let me know if you need more information.
Hi,

So it appears that this isn't a nagios issue, please address this
problem with hipsaint:

https://github.com/hannseman/hipsaint
--
Regards,

Giles Coochey, CCNP, CCNA, CCNAS
NetSecSpec Ltd
+44 (0) 8444 780677
+44 (0) 7983 877438
http://www.coochey.net
http://www.netsecspec.co.uk
***@coochey.net
Scott VR
2013-08-02 14:17:16 UTC
Permalink
For what it is worth, even of not a nagios issue, from the error it appears
that your input string should be pipe-delimited.

So to test you'd do something like

/usr/bin/hipsaint --token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307
--type=service --inputs="Main Website solr|Wed Jul 31 20:42:28 IST
2013|Recovery| 192.168.70.15|Recovery|Ping OK"

When you replaced the macros, you also replaced the pipe characters with
space, causing the python spit method to fail.
Post by Kaushal Shriyan
On Fri, Jul 26, 2013 at 8:03 PM, Kaushal Shriyan <
Post by Kaushal Shriyan
Hi,
Thanks for the reply. I have put the below entries in nagios
commands.cfg file I am running Nagios 3.4.4 on CentOS 6.4.
define command {
command_name notify-host-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=host
--inputs="$HOSTNAME$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$HOSTSTATE$|$HOSTOUTPUT$"
-n
}
define command {
command_name notify-service-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=service
--inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$"
-n
}
I am unable to see any nagios alert messages in hipchat window. Please
let me know if anyone needs more information.
Regards,
Kaushal
Hi,
Checking in again for my earlier post to this mailing list. Any
suggestions please?
Regards,
Kaushal
Have you tried running the command manually on the command line as the
nagios user?
Hi Giles Coochey,
Apologies for the delay in replying the email.
/usr/bin/hipsaint --token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307
--type=service
--inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$"
when i run the below command replacing all macros, I get the below issue.
uid=502(nagios) gid=502(nagios) groups=502(nagios),503(nagcmd)
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=service
--inputs="Main Website solr Wed Jul 31 20:42:28 IST 2013 Recovery
192.168.70.15 Recovery Ping OK"
File "/usr/bin/hipsaint", line 9, in <module>
load_entry_point('hipsaint==0.4', 'console_scripts', 'hipsaint')()
File
"/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/bin/commands.py",
line 55, in main
msg.deliver_payload()
File
"/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/messages.py",
line 29, in deliver_payload
message_body = self.render_message()
File
"/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/messages.py",
line 56, in render_message
servicedesc, hostalias, timestamp, ntype, hostaddress, state,
serviceoutput = self.inputs.split('|')
ValueError: need more than 1 value to unpack
Please let me know if you need more information.
Regards
Kaushal
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
Kaushal Shriyan
2013-08-03 00:22:16 UTC
Permalink
Post by Scott VR
For what it is worth, even of not a nagios issue, from the error it
appears that your input string should be pipe-delimited.
So to test you'd do something like
/usr/bin/hipsaint --token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307
--type=service --inputs="Main Website solr|Wed Jul 31 20:42:28 IST
2013|Recovery| 192.168.70.15|Recovery|Ping OK"
When you replaced the macros, you also replaced the pipe characters with
space, causing the python spit method to fail.
Thanks Scott, It worked as expected as I was missing the pipe character (*|
*) in the command.

Regards

Kaushal
Post by Scott VR
Post by Kaushal Shriyan
On Fri, Jul 26, 2013 at 8:03 PM, Kaushal Shriyan <
Post by Kaushal Shriyan
Hi,
Thanks for the reply. I have put the below entries in nagios
commands.cfg file I am running Nagios 3.4.4 on CentOS 6.4.
define command {
command_name notify-host-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=host
--inputs="$HOSTNAME$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$HOSTSTATE$|$HOSTOUTPUT$"
-n
}
define command {
command_name notify-service-by-hipchat
command_line /usr/bin/hipsaint
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=service
--inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$"
-n
}
I am unable to see any nagios alert messages in hipchat window. Please
let me know if anyone needs more information.
Regards,
Kaushal
Hi,
Checking in again for my earlier post to this mailing list. Any
suggestions please?
Regards,
Kaushal
Have you tried running the command manually on the command line as the
nagios user?
Hi Giles Coochey,
Apologies for the delay in replying the email.
/usr/bin/hipsaint --token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307
--type=service
--inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$"
when i run the below command replacing all macros, I get the below issue.
uid=502(nagios) gid=502(nagios) groups=502(nagios),503(nagcmd)
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=service
--inputs="Main Website solr Wed Jul 31 20:42:28 IST 2013 Recovery
192.168.70.15 Recovery Ping OK"
File "/usr/bin/hipsaint", line 9, in <module>
load_entry_point('hipsaint==0.4', 'console_scripts', 'hipsaint')()
File
"/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/bin/commands.py",
line 55, in main
msg.deliver_payload()
File
"/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/messages.py",
line 29, in deliver_payload
message_body = self.render_message()
File
"/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/messages.py",
line 56, in render_message
servicedesc, hostalias, timestamp, ntype, hostaddress, state,
serviceoutput = self.inputs.split('|')
ValueError: need more than 1 value to unpack
Please let me know if you need more information.
Regards
Kaushal
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
Loading...