log file in /usr/local/nagios/var/archives
Posted: Tue Sep 26, 2017 1:44 pm
We have Nagios XI 5.2.3 installed on a Redhat 6.8 system. In the /usr/local/nagios/var/archives directory, there is a log file per day that contains the measurements for all the managed hosts. In the this daily log file, there is a CPU usage measurement for a host that is monitored with a Nagios service for CPU, a SWAP usage measurement for a host that is monitored with a Nagios service for SWAP usage, and so on. Here are some samples:
$ grep zakr1scpx01bex001 /usr/local/nagios/var/archives/nagios-09-25-2017-00.log |grep CPU |grep "CURRENT SERVICE STATE"
[1506211200] CURRENT SERVICE STATE: zakr1scpx01bex001;CPU_load_vm_8cpu;OK;HARD;1;OK - load average: 0.12, 0.17, 0.16
$ grep zakr1scpx01bex001 /usr/local/nagios/var/archives/nagios-09-26-2017-00.log |grep CPU |grep "CURRENT SERVICE>
[1506297600] CURRENT SERVICE STATE: zakr1scpx01bex001;CPU_load_vm_8cpu;OK;HARD;1;OK - load average: 0.08, 0.09, 0.08
$ grep zakr1scpx01bex001 /usr/local/nagios/var/archives/nagios-09-22-2017-00.log |grep SWAP |grep "CURRENT SERVIC>
[1505952000] CURRENT SERVICE STATE: zakr1scpx01bex001;Swap_util_vm;OK;HARD;1;SWAP OK - 100% free (16383 MB out of 16383 MB)
$ grep zakr1scpx01bex001 /usr/local/nagios/var/archives/nagios-09-23-2017-00.log |grep SWAP |grep "CURRENT SERVIC>
[1506038400] CURRENT SERVICE STATE: zakr1scpx01bex001;Swap_util_vm;OK;HARD;1;SWAP OK - 100% free (16383 MB out of 16383 MB)
Is this the CPU usage measurement from the last CPU usage polling on the host of the day, or it is the average CPU usage on the host of the day? The "CURRENT SERVICE STATE" in the line seems implying this is the CPU usage at the moment when the Nagios service for CPU runs and reports for the host. At the end of the day, the last run of the Nagios service for CPU usage is logged to this file. Please clarify it. Thanks!
$ grep zakr1scpx01bex001 /usr/local/nagios/var/archives/nagios-09-25-2017-00.log |grep CPU |grep "CURRENT SERVICE STATE"
[1506211200] CURRENT SERVICE STATE: zakr1scpx01bex001;CPU_load_vm_8cpu;OK;HARD;1;OK - load average: 0.12, 0.17, 0.16
$ grep zakr1scpx01bex001 /usr/local/nagios/var/archives/nagios-09-26-2017-00.log |grep CPU |grep "CURRENT SERVICE>
[1506297600] CURRENT SERVICE STATE: zakr1scpx01bex001;CPU_load_vm_8cpu;OK;HARD;1;OK - load average: 0.08, 0.09, 0.08
$ grep zakr1scpx01bex001 /usr/local/nagios/var/archives/nagios-09-22-2017-00.log |grep SWAP |grep "CURRENT SERVIC>
[1505952000] CURRENT SERVICE STATE: zakr1scpx01bex001;Swap_util_vm;OK;HARD;1;SWAP OK - 100% free (16383 MB out of 16383 MB)
$ grep zakr1scpx01bex001 /usr/local/nagios/var/archives/nagios-09-23-2017-00.log |grep SWAP |grep "CURRENT SERVIC>
[1506038400] CURRENT SERVICE STATE: zakr1scpx01bex001;Swap_util_vm;OK;HARD;1;SWAP OK - 100% free (16383 MB out of 16383 MB)
Is this the CPU usage measurement from the last CPU usage polling on the host of the day, or it is the average CPU usage on the host of the day? The "CURRENT SERVICE STATE" in the line seems implying this is the CPU usage at the moment when the Nagios service for CPU runs and reports for the host. At the end of the day, the last run of the Nagios service for CPU usage is logged to this file. Please clarify it. Thanks!