#!/bin/sh
DESTINATION=`date +"$1"`
count=`s3cmd ls $DESTINATION | wc -l`
if [ $count -gt 0 ]
then
echo "OK - File exist."
exit 0
else
echo "CRITICAL - File not found."
exit 2
fi
When I tried it out on linux command line, I am able to get the correct result with state OK. However after registering the command and service. It's giving me critical state.
Is there anything that I miss out when doing my plugin?
What do you see when you try to schedule an immediate check under "Service Status Detail"? Can you show a screenshot of this page? Are you testing your check under the CCM (by clicking on the "Test Check Command" button)? Can you show us the service and command definitions?
Be sure to check out our Knowledgebase for helpful articles and solutions!
What is the output from the "test check command"? We want to see if further escaping is necessary for the check in XI.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
It looks like year (%Y) and month (%m) are not getting populated with the actual date.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
This may also not work from the test check command since we are escaping inside of the command. You may have to use the service itself once you apply configuration, and schedule immediate checks to get updates.