Yes there is more to my script.
I have attached it because I find it quite useful.
It will monitor your bandwidth with vnstat and output in a format nagios understands.
Also to note, this is my first proper script.
Yes you can mark this as solved.
Thank you.
Search found 4 matches
- Fri May 15, 2015 11:33 am
- Forum: Open Source Nagios Projects
- Topic: Send_nsca not working in cron
- Replies: 7
- Views: 2131
- Fri May 15, 2015 7:06 am
- Forum: Open Source Nagios Projects
- Topic: Send_nsca not working in cron
- Replies: 7
- Views: 2131
Re: Send_nsca not working in cron
Thank you for reply's btw. Ok I found my solution for this. My script was exiting prematurely in an if statement. Statement is to check for valid network interfaces. I'm guessing because cron isn't executed in the same environment it was taking 0 for the value of $foundface. So then it would just ju...
- Thu May 14, 2015 11:01 am
- Forum: Open Source Nagios Projects
- Topic: Send_nsca not working in cron
- Replies: 7
- Views: 2131
Re: Send_nsca not working in cron
It is in roots crontab.
I do see the process getting executed in the log file.
Selinux is disabled.
A coworker suggested something along the lines of adding tty to cron.
Since cron isn't run in the same environment as a terminal.
I am still looking into this and will post if I find a solution.
I do see the process getting executed in the log file.
Selinux is disabled.
A coworker suggested something along the lines of adding tty to cron.
Since cron isn't run in the same environment as a terminal.
I am still looking into this and will post if I find a solution.
- Thu May 14, 2015 5:28 am
- Forum: Open Source Nagios Projects
- Topic: Send_nsca not working in cron
- Replies: 7
- Views: 2131
Send_nsca not working in cron
Hello All, I am setting up passive checks for the first time. I have gotten to the point where my script, to check bandwidth, will run and successfully execute this command send_nsca -H 172.16.0.0 -p 5667 -d ";" -c /etc/nagios/send_nsca.cfg <<< "Host;Service;$exitcode;$nagiosmsg"...