nagios alert messages not appearing in hipchat chat window.

Kaushal Shriyan kaushalshriyan at gmail.com
Sat Aug 3 02:22:16 CEST 2013


On Fri, Aug 2, 2013 at 7:47 PM, Scott VR <scottvr at gmail.com> wrote:

> 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


> On Jul 31, 2013 10:28 AM, "Kaushal Shriyan" <kaushalshriyan at gmail.com>
> wrote:
>
>>
>>
>> On Sun, Jul 28, 2013 at 1:27 PM, Giles Coochey <giles at coochey.net> wrote:
>>
>>>  On 27/07/2013 10:38, Kaushal Shriyan wrote:
>>>
>>>
>>>
>>> On Fri, Jul 26, 2013 at 8:03 PM, Kaushal Shriyan <
>>> kaushalshriyan at gmail.com> wrote:
>>>
>>>> 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 at nagios ~]$ id
>> uid=502(nagios) gid=502(nagios) groups=502(nagios),503(nagcmd)
>> [nagios at 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 at nagios ~]$
>>
>> 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
>> Nagios-users at lists.sourceforge.net
>> 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
> Nagios-users at lists.sourceforge.net
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20130803/0e6013ee/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
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


More information about the Users mailing list