Search found 5 matches
- Fri Oct 11, 2013 8:44 am
- Forum: Open Source Nagios Projects
- Topic: Custom Nagios check works from command line, but not Nagios
- Replies: 11
- Views: 11407
Re: Custom Nagios check works from command line, but not Nag
Figured out the issue, the ec2 api command wasn't picking up the environment. After adding: export PATH=$PATH:/opt/ec2-api-tools/bin export EC2_HOME=/opt/ec2-api-tools/ export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/ export AWS_ACCESS_KEY=********************************** expor...
- Wed Oct 09, 2013 12:04 pm
- Forum: Open Source Nagios Projects
- Topic: Custom Nagios check works from command line, but not Nagios
- Replies: 11
- Views: 11407
Re: Custom Nagios check works from command line, but not Nag
Yep, in the OP there are two code sections showing the output. The script is echoing the variables for debugging purposes. In the shell version all 4 variables contain values. In the Nagios web UI version there are empty variables such as $reserveddate. Because there is no value, the other calculate...
- Tue Oct 08, 2013 1:16 pm
- Forum: Open Source Nagios Projects
- Topic: Custom Nagios check works from command line, but not Nagios
- Replies: 11
- Views: 11407
Re: Custom Nagios check works from command line, but not Nag
For sure: [root@linserver2 ~]# su - nagios -bash-4.1$ /opt/ec2-api-tools/bin/ec2-describe-reserved-instances | head -n 1 RESERVEDINSTANCES *************************************** us-east-1b m1.small Linux/UNIX 1y 227.5 0.03 1 2011-10-06T12:33:23+0000 retired USD default Medium Utilization -bash-4.1$...
- Tue Oct 08, 2013 12:42 pm
- Forum: Open Source Nagios Projects
- Topic: Custom Nagios check works from command line, but not Nagios
- Replies: 11
- Views: 11407
Re: Custom Nagios check works from command line, but not Nag
Is it valid to test by:
#su - nagios
Then run the command? If so, the nagios user can run the command without issue, and can run my shell script without issue.
#su - nagios
Then run the command? If so, the nagios user can run the command without issue, and can run my shell script without issue.
- Tue Oct 08, 2013 10:21 am
- Forum: Open Source Nagios Projects
- Topic: Custom Nagios check works from command line, but not Nagios
- Replies: 11
- Views: 11407
Custom Nagios check works from command line, but not Nagios
Hello all, I've created a basic script that grabs our AWS reserved instance dates and does a simple calculation to determine if the oldest instance will expire in the next 5 days. I can run the script from a shell without issue, but when Nagios runs it as a check some values are not populated: Scrip...