<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Nagios + Event Handler + Java program in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/nagios-event-handler-java-program/m-p/4374873#M347789</link>
    <description>I did that earlier and even tried it just now. Nothing happens. I try to check port 7000 after the script and it is not started.&lt;BR /&gt;&lt;BR /&gt;netstat -nlp | grep 7000&lt;BR /&gt;&lt;BR /&gt;Doesn't show anything for port 7000&lt;BR /&gt;</description>
    <pubDate>Mon, 09 Mar 2009 16:09:26 GMT</pubDate>
    <dc:creator>mzahmed</dc:creator>
    <dc:date>2009-03-09T16:09:26Z</dc:date>
    <item>
      <title>Nagios + Event Handler + Java program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nagios-event-handler-java-program/m-p/4374870#M347786</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am trying to start a java program from nagios event handler at CRITICAL + SOFT + 3 or CRITICAL + HARD status.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;My Observations:&lt;BR /&gt; I used the echo command in mytest.sh and am getting the result in the nagios.debug log file.&lt;BR /&gt; But when I am running the java command in mytest.sh script that java program is not executing on port 7000.&lt;BR /&gt; I double checked on the permission and everything look good to me.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Following is my configuration status.&lt;BR /&gt;&lt;BR /&gt;Nagios 3.0.7&lt;BR /&gt;&lt;BR /&gt;JDK 1.5.0_07&lt;BR /&gt;&lt;BR /&gt;define service {&lt;BR /&gt;        service_description              MY_XYZ_SERVICE&lt;BR /&gt;        name                             MyxyzService&lt;BR /&gt;        use                              tcp-service&lt;BR /&gt;        contact_groups                   Admins&lt;BR /&gt;        check_command                    check_tcp!7000&lt;BR /&gt;        event_handler                    restart_xyz&lt;BR /&gt;        hostgroup_name                   appservers&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;define command{&lt;BR /&gt;        command_name    restart_xyz&lt;BR /&gt;        command_line    /home/test/test1.sh $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;test1.sh&lt;BR /&gt;---------&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;case "$1" in&lt;BR /&gt;OK)&lt;BR /&gt;        ;;&lt;BR /&gt;WARNING)&lt;BR /&gt;        ;;&lt;BR /&gt;UNKNOWN)&lt;BR /&gt;        ;;&lt;BR /&gt;CRITICAL)&lt;BR /&gt;        SOFT)&lt;BR /&gt;                case "$3" in&lt;BR /&gt;                3)&lt;BR /&gt;                        echo -n "Restarting Myxyz service (3rd soft critical state)..."&lt;BR /&gt;                        /home/xyz/mytest.sh&lt;BR /&gt;                        ;;&lt;BR /&gt;                        esac&lt;BR /&gt;                ;;&lt;BR /&gt;&lt;BR /&gt;        HARD)&lt;BR /&gt;                echo -n "Restarting Myxyz service..."&lt;BR /&gt;                /home/xyz/mytest.sh&lt;BR /&gt;                ;;&lt;BR /&gt;        esac&lt;BR /&gt;        ;;&lt;BR /&gt;esac&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;mytest.sh&lt;BR /&gt;-----------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;&lt;BR /&gt;# echo "hello world This works perfectly when I remove the comment but the below java command is not executed." &lt;BR /&gt;&lt;BR /&gt;nohup java -Xrs com.test.xyz.MyXYZServer 7000 &amp;amp;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Mar 2009 15:13:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nagios-event-handler-java-program/m-p/4374870#M347786</guid>
      <dc:creator>mzahmed</dc:creator>
      <dc:date>2009-03-09T15:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios + Event Handler + Java program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nagios-event-handler-java-program/m-p/4374871#M347787</link>
      <description>given: &lt;BR /&gt;"nohup java -Xrs com.test.xyz.MyXYZServer 7000 &amp;amp; "&lt;BR /&gt;&lt;BR /&gt;what happens if you specify:&lt;BR /&gt;nohup &lt;FULLPATHTO&gt;java -Xrs &lt;FULLPATHTO&gt;com.test.xyz.MyXYZServer 7000 &amp;amp; &lt;BR /&gt;&lt;/FULLPATHTO&gt;&lt;/FULLPATHTO&gt;</description>
      <pubDate>Mon, 09 Mar 2009 15:49:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nagios-event-handler-java-program/m-p/4374871#M347787</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-03-09T15:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios + Event Handler + Java program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nagios-event-handler-java-program/m-p/4374872#M347788</link>
      <description>Is it possible the echo line is too long and divided into two lines?</description>
      <pubDate>Mon, 09 Mar 2009 16:07:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nagios-event-handler-java-program/m-p/4374872#M347788</guid>
      <dc:creator>Tingli</dc:creator>
      <dc:date>2009-03-09T16:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios + Event Handler + Java program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nagios-event-handler-java-program/m-p/4374873#M347789</link>
      <description>I did that earlier and even tried it just now. Nothing happens. I try to check port 7000 after the script and it is not started.&lt;BR /&gt;&lt;BR /&gt;netstat -nlp | grep 7000&lt;BR /&gt;&lt;BR /&gt;Doesn't show anything for port 7000&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Mar 2009 16:09:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nagios-event-handler-java-program/m-p/4374873#M347789</guid>
      <dc:creator>mzahmed</dc:creator>
      <dc:date>2009-03-09T16:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios + Event Handler + Java program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nagios-event-handler-java-program/m-p/4374874#M347790</link>
      <description>Naah, I just put the echo line there to explain the comment. I have just echo "Hello World" in my actual script.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Mar 2009 16:10:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nagios-event-handler-java-program/m-p/4374874#M347790</guid>
      <dc:creator>mzahmed</dc:creator>
      <dc:date>2009-03-09T16:10:34Z</dc:date>
    </item>
  </channel>
</rss>

