5:45 PM 12/13/2007:


use webinject ( i had POST auth anyway so … ) chmod the folder that the pl is running in … no full path needed …

**4:53 PM 12/13/2007:

well I tried webinject and once again the same thing with this … I can do the command line JUST FINE ! but when I try to put it in services.cfg and command.cfg I get errors … this is getting annoying …

  • chown nagios and 777 all files in the cfg and bin folder for nagios …
  • I also tried FULL path to the XML files … NO LUCK …
nagios# ./ -c config.xml MyApplication.xml
WebInject OK - All tests passed successfully in 1.12 seconds |time=1.12;20;;0
define command{
command_name    webinject
command_line    $USER1$/ -c $ARG1$ $ARG2$
define service {
        use generic-service
        service_description webinject
        check_command webinject!config.xml!MyApplication.xml
        normal_check_interval 1
        retry_check_interval 1
        parallelize_check 0
        host_name adtechcrm
        contact_groups admins,admins

CLI works fine I just can’t get the syntax right in command or services !!

  • where do I set verbose to 3 in the cfg or nagios -v 3 ?
  • is it the ‘’ that is breaking it ? or ?
  • should I put something in quotes ? if so what ?
  • is there a way I can just use the shell scrtipt “one liner” as the services instead of using ! and $ARG1$ on all the cfg files and such ??? it is quite annoying trying to get the command / services to match etc …
nagios# ./check_http -H server -u /synergy/docs/bp.asp -a "MSdomain\user:qqq123" -s "Exact e-Synergy - User Name"
HTTP OK HTTP/1.1 200 OK - 0.929 second response time |time=0.928602s;;;0.000000 size=1090B;;;0
define service {
        use generic-service
        service_description Synergy
        check_command check_http!/synergy/docs/bp.asp!"adtechsol\user:qqq123"!Exact
        normal_check_interval 1
        host_name adtechcrm
        contact_groups admins,admins

define command{
command_name    check_http
command_line    $USER1$/check_http -H $HOSTADDRESS$ -u  $ARG1$ -a $ARG2$  -s $ARG3$


Nagios 2.9 starting… (PID=44078)
ERROR: Failed to open /usr/local/etc/nagios/config.xml file

// OK fine … you can’t open that file OK lets see is the file there ???

nagios# cat /usr/local/etc/nagios/config.xml
WebInject Application Tester

// OK the file is there so lets check the perms maybe its like 444 or something

nagios# ls -lah /usr/local/etc/nagios/config.xml
-rwxrwxrwx 1 nagios wheel 284B Dec 13 17:06 /usr/local/etc/nagios/config.xml

// OK so … its not that the file is not there OR that what ever app is trying to accsess it can’t because its 777 so …
// NAGIOS you FAIL !!