404 Not Found

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

404 Not Found

Post by braindope »

Hi,


The error below happens when i click my SQL jobs checks. It supposed to output what are my errors in my SQL
Not Found

The requested URL /nagios/sqllog/<nagios machine IP>-2015-03-11.html was not found on this server.
I'm using check_sqljob.sh as my service checks

Update:

This error is due to the fact that there is no generated file for this day in this directory /usr/local/nagios/share/sqllog/ , because there is no error recorded. How can i make the check to generate file everyday and still log the previous day error's
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: 404 Not Found

Post by jdalrymple »

Hi braindope

This check has a LOT of moving parts.

1) Have you verified the output of the plugin when running from the command line?
2) Have you configured the url.properties file to put the file in a real location on your server in which your nagios user has rights to write and your apache user has rights to read?
3) Have you configured your Apache to direct the browser provided URI to the proper location on your Nagios server's disk?

Like I said - lots of moving parts, and I'd say the order above is the basic troubleshooting outline to work with. Let us know.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: 404 Not Found

Post by braindope »

Hi jdalrymple,

Thank you for replying to my post. :D

My error occurs when there is no file generated for that day, in /usr/local/nagios/share/sqllog directory. In a sense, if there will be an SQL job failed recorded, the error that i reported will not be seen, since it can fetch a file from the directory.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: 404 Not Found

Post by jdalrymple »

Do the files get created for any day or for any services, or is it not working at all?

Additionally have you already ran this service check from the command line to verify its output and also verify that when run from the command line the file is created?

What are the permissions on that sqllog folder?

Code: Select all

ll /usr/local/nagios/share/sqllog
We really need the answers to some of the questions in order to be able to further troubleshoot.
Locked