<br><br><div class="gmail_quote">On Sun, Jul 28, 2013 at 1:27 PM, Giles Coochey <span dir="ltr"><<a href="mailto:giles@coochey.net" target="_blank">giles@coochey.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><div><div class="h5">
<div>On 27/07/2013 10:38, Kaushal Shriyan
wrote:<br>
</div>
<blockquote type="cite"><br>
<br>
<div class="gmail_quote">On Fri, Jul 26, 2013 at 8:03 PM, Kaushal
Shriyan <span dir="ltr"><<a href="mailto:kaushalshriyan@gmail.com" target="_blank">kaushalshriyan@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p style="line-height:18px;color:rgb(51,51,51);font-size:14px;font-family:Helvetica,Arial,sans-serif;margin:0px 0px 15px;padding:0px">Hi,</p>
<p style="line-height:18px;color:rgb(51,51,51);font-size:14px;font-family:Helvetica,Arial,sans-serif;margin:0px 0px 15px;padding:0px">
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.</p>
<p style="line-height:18px;color:rgb(51,51,51);font-size:14px;font-family:Helvetica,Arial,sans-serif;margin:0px 0px 15px;padding:0px">
define command { <br>
command_name notify-host-by-hipchat <br>
command_line /usr/bin/hipsaint <br>
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307
--type=host <br>
--inputs="$HOSTNAME$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$HOSTSTATE$|$HOSTOUTPUT$" <br>
-n <br>
} <br>
define command { <br>
command_name notify-service-by-hipchat <br>
command_line /usr/bin/hipsaint <br>
--token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307
--type=service <br>
--inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$" <br>
-n <br>
}</p>
<p style="line-height:18px;color:rgb(51,51,51);font-size:14px;font-family:Helvetica,Arial,sans-serif;margin:0px 0px 15px;padding:0px">I am unable to see any nagios alert
messages in hipchat window. Please let me know if anyone
needs more information.</p>
<p style="line-height:18px;color:rgb(51,51,51);font-size:14px;font-family:Helvetica,Arial,sans-serif;margin:0px 0px 15px;padding:0px">Regards,</p>
<p style="line-height:18px;color:rgb(51,51,51);font-size:14px;font-family:Helvetica,Arial,sans-serif;margin:0px 0px 15px;padding:0px">
Kaushal</p>
</blockquote>
</div>
<br>
<div>Hi,</div>
<div><br>
</div>
<div>Checking in again for my earlier post to this mailing list.
Any suggestions please?</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>Kaushal</div>
<br>
</blockquote></div></div>
Have you tried running the command manually on the command line as
the nagios user?</div></blockquote><div><br></div><div>Hi Giles Coochey,</div><div><br></div><div>Apologies for the delay in replying the email. </div><div><br></div><div><div>/usr/bin/hipsaint --token=c29bab160e8e6a4f3ca39ba6fe7c1d --room=67307 --type=service --inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$"</div>
<div><br></div><div>when i run the below command replacing all macros, I get the below issue.</div><div>[nagios@nagios ~]$ id</div><div>uid=502(nagios) gid=502(nagios) groups=502(nagios),503(nagcmd)</div><div>[nagios@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"</div>
<div>Traceback (most recent call last):</div><div> File "/usr/bin/hipsaint", line 9, in <module></div><div> load_entry_point('hipsaint==0.4', 'console_scripts', 'hipsaint')()</div>
<div> File "/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/bin/commands.py", line 55, in main</div><div> msg.deliver_payload()</div><div> File "/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/messages.py", line 29, in deliver_payload</div>
<div> message_body = self.render_message()</div><div> File "/usr/lib/python2.6/site-packages/hipsaint-0.4-py2.6.egg/hipsaint/messages.py", line 56, in render_message</div><div> servicedesc, hostalias, timestamp, ntype, hostaddress, state, serviceoutput = self.inputs.split('|')</div>
<div>ValueError: need more than 1 value to unpack</div><div>[nagios@nagios ~]$</div></div><div><br></div><div>Please let me know if you need more information.</div><div><br></div><div>Regards</div><div><br></div><div>Kaushal</div>
</div>