as pnp4nagios do generate the graph of my script?
-
- Posts: 23
- Joined: Sat Apr 18, 2015 9:06 am
Re: as pnp4nagios do generate the graph of my script?
dear friend I have that same script running on other equipment along with the nagios he creates the txt file normally. when I put the script on other equipment that I want to monitor him from the uknow error.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: as pnp4nagios do generate the graph of my script?
Does the other equipment have correct directory permissions that allow the nagios user to create / update a file in that location?
What happens when you test the script as the nagios user?
What happens when you test the script as the nagios user?
Code: Select all
su nagios
./check_your_plugin blah blah blah
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 23
- Joined: Sat Apr 18, 2015 9:06 am
Re: as pnp4nagios do generate the graph of my script?
thank you friends got was even x permission in directory
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: as pnp4nagios do generate the graph of my script?
Is your problem now resolved?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 23
- Joined: Sat Apr 18, 2015 9:06 am
Re: Nagios will not return string from bash script
dear friends to this forum helped me solve my problems I decided to post my code
I hope it helps more people
I hope it helps more people
Code: Select all
# bash -x check_ccq_estacao_tx_router
cd /home/nagios
rm -rf ccq-tx-estacao.txt
outputSSH=$ ssh user@10.255.255.133 "/interface wireless monitor 0 once"|grep tx-ccq|sed 's/%//' > ccq-tx-estacao.txt
output=$(sed 's/tx-ccq://g' ccq-tx-estacao.txt)
if [ $output -ge 85 ] ; then
echo "$output % | ccqtx=$output"
exit 0;
elif [ $output -le 85 ]; then
echo "$output % | ccqtx=$output"
exit 2;
else
echo "$output"
exit 1;
fi
exit 3;
Re: as pnp4nagios do generate the graph of my script?
Thanks for the update!
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 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.