Search found 4 matches
- Wed Jan 09, 2019 12:49 pm
- Forum: Open Source Nagios Projects
- Topic: Wrong status displayed when using custom bash/shell script.
- Replies: 7
- Views: 2882
Re: Wrong status displayed when using custom bash/shell scri
HEY! So ya, there were two issues with my code. The first was that the code nagios was trying to run was written from a different user, so I gave it the correct permissions. Second, I added absolute path for the files I'm looking for, turns out I was running the script from a different directory. Lo...
- Tue Jan 08, 2019 3:51 pm
- Forum: Open Source Nagios Projects
- Topic: Wrong status displayed when using custom bash/shell script.
- Replies: 7
- Views: 2882
Re: Wrong status displayed when using custom bash/shell scri
The only message I see on Nagios is this;
=========================
Test not found!
Creating Test.
File not found!
Creating File.
=========================
and the status for this service is always Warning, However, when I run the script manually, exit code is 0.
=========================
Test not found!
Creating Test.
File not found!
Creating File.
=========================
and the status for this service is always Warning, However, when I run the script manually, exit code is 0.
- Tue Jan 08, 2019 2:40 pm
- Forum: Open Source Nagios Projects
- Topic: Wrong status displayed when using custom bash/shell script.
- Replies: 7
- Views: 2882
Re: Wrong status displayed when using custom bash/shell scri
Thanks for the reply, here's the script. #!/bin/bash echo ========================= #Files to be checked fileName="Test" file="File" #Today's date date=`date +_%Y.%m.%d` #Today's date with the time now=`date +_%Y.%m.%d_%H:%M:%S` #Path location of the files to be checked for path=...
- Fri Jan 04, 2019 7:48 pm
- Forum: Open Source Nagios Projects
- Topic: Wrong status displayed when using custom bash/shell script.
- Replies: 7
- Views: 2882
Wrong status displayed when using custom bash/shell script.
Hello! I wrote my own little script called "check_files". Basically it checks whether or not a file exist within a specified directory on ubuntu 18.04. I've spent quite some time researching both shell/bash scripting and nagios integration, but things aren't going as I want. My code is usi...