I'd like to know how long and if there's a file I can pull service check history on per server.... I've looked in:
/usr/local/nagios/share/perfdata
And found all our hosts. The checks I'm wanting history on have an rrd file & XML file in their directory. But I'm not sure that's what I'm looking for. They seem pretty small and I haven't looked at how to properly consume those files yet. We basically just want a complete status history as far back as we can get on this service:
The reports I run only show status changes... we just want to see each run and report on it... what would be the best way to get this done assuming it's possible?
Thanks.
Service check history question.
-
JakeHatMacys
- Posts: 281
- Joined: Thu Sep 25, 2014 3:21 pm
Service check history question.
You do not have the required permissions to view the files attached to this post.
Re: Service check history question.
Are you looking for state history, performance data, or both?
The rrd & XML files you mentioned, in /usr/local/nagios/share/perfdata, contain performance data only. State history, on the other hand, is found in:
/usr/local/nagios/var/nagios.log
/usr/local/nagios/var/archives/
Sorry if I'm stating the obvious here, but have you already tried running a State History report? Reports > Available Reports > State History
The rrd & XML files you mentioned, in /usr/local/nagios/share/perfdata, contain performance data only. State history, on the other hand, is found in:
/usr/local/nagios/var/nagios.log
/usr/local/nagios/var/archives/
Sorry if I'm stating the obvious here, but have you already tried running a State History report? Reports > Available Reports > State History
Be sure to check out the Knowledgebase for helpful articles and solutions!
-
JakeHatMacys
- Posts: 281
- Joined: Thu Sep 25, 2014 3:21 pm
Re: Service check history question.
It looks like /usr/local/nagios/var/archives/ is more or less what we're looking for.bwallace wrote:Are you looking for state history, performance data, or both?
The rrd & XML files you mentioned, in /usr/local/nagios/share/perfdata, contain performance data only. State history, on the other hand, is found in:
/usr/local/nagios/var/nagios.log
/usr/local/nagios/var/archives/
Sorry if I'm stating the obvious here, but have you already tried running a State History report? Reports > Available Reports > State History
And yes on state history, unless I'm missing something state history will only give you state changes though correct? The scripts we're running for metrics always come back green, just gather information with no alerting.
Plus we want to reference this information across all servers and run reports on it... We were sending each run over to our HP BSM for storage but we had a problem during the holidays and for whatever reason sending more metric data ended up destabilizing the connector daemon. Long story short we stopped feeding BSM and sort of forgot to turn it back on *Whistles* so these logs in archives will save our butts.
Re: Service check history question.
Its always interesting to hear what other purposes Nagios data can be used for. You are correct on state history, you get state changes (for a host, service or both) or you can report on a specific state only. Below is a state history report I ran real quick on localhost. Sounds like we may be good to lock this thread now, but did you have any other questions?
You do not have the required permissions to view the files attached to this post.
Be sure to check out the Knowledgebase for helpful articles and solutions!
-
JakeHatMacys
- Posts: 281
- Joined: Thu Sep 25, 2014 3:21 pm
Re: Service check history question.
Hello, so circling back to this. What we're finding is only one entry per box for our service check in the log files in:
/usr/local/nagios/var/archives/
nagios-12-31-2015-00.log for example.... we were hoping to get a record of every run specifically the Status information of each run:
Now we did not have retain status information on this check turned on.... I just switched it on:
Let me know if you guys can bail us out O.o
/usr/local/nagios/var/archives/
nagios-12-31-2015-00.log for example.... we were hoping to get a record of every run specifically the Status information of each run:
Now we did not have retain status information on this check turned on.... I just switched it on:
Let me know if you guys can bail us out O.o
You do not have the required permissions to view the files attached to this post.
Re: Service check history question.
The retain status information is just retaining the status of the just through nagios process restarts and is unrelated.
The state history report, /usr/local/nagios/var/nagios.log, and /usr/local/nagios/var/archives/ are the only places that you will find them.
The state history report, /usr/local/nagios/var/nagios.log, and /usr/local/nagios/var/archives/ are the only places that you will find them.
-
JakeHatMacys
- Posts: 281
- Joined: Thu Sep 25, 2014 3:21 pm
Re: Service check history question.
And it looks like it's only logging hard states or service alerts.... if I'm correct on that. We're looking for every run, even all the good ones. Are those stored anywhere??? Or am I wrong and are they stored there, we're just grepping the log for particular hosts running the check and only seeing one entry or so...ssax wrote:The retain status information is just retaining the status of the just through nagios process restarts and is unrelated.
The state history report, /usr/local/nagios/var/nagios.log, and /usr/local/nagios/var/archives/ are the only places that you will find them.
Re: Service check history question.
I don't think that is available, not every check result is logged, only state changes. Here is a good reference (ignore the stalking and look at the table of when it's logged):
https://assets.nagios.com/downloads/nag ... lking.html
https://assets.nagios.com/downloads/nag ... lking.html