Page 1 of 2

Parameters stored by Nagios for the alarms/events received!!

Posted: Mon May 15, 2017 12:14 am
by network2016
Hi

Please help me on the parameters nagiosxi store in its database in order to store the alarm information it receive from the devices it is monitoring. Please advise me the directory or location where the ,for example an alarm received from a network switch is stored and I can view the parameters in the alarm information.

What are the parameters nagiosXi expecting from any device in order to receive following data..........

alarm
device initialization
performance data

Please help me with the information or the documentation available.
Thanks

Re: Parameters stored by Nagios for the alarms/events receiv

Posted: Mon May 15, 2017 2:59 pm
by tgriep
The data for when a check it run, and it's output are stored in the /usr/local/nagios/var/nagios.log file and are archived daily to this folder on the server
/usr/local/nagios/var/archives
those locations would be the first place to look for the data.

What nagios does is to schedule plugins to run on the check interval you selected. The plugins do the work and return the status / performance data for the check and then act upon the plugin's output.

For a description of a plugin and it's return state, take a look at this link.
https://assets.nagios.com/downloads/nag ... inapi.html
https://assets.nagios.com/downloads/nag ... fdata.html


The link below has a diagram on how the performance data is captured and processed, take a look at it as well.
https://support.nagios.com/kb/article.php?id=41

Eventually, the data gets stored in round robin databases (RRD files) and when you display a graph, it looks at the RRD files, processes it and graphs the data.
The RRD files are typically stored in the /usr/local/nagios/var/spool/perfdata/<hostname> folder.

Re: Parameters stored by Nagios for the alarms/events receiv

Posted: Tue May 16, 2017 1:57 am
by network2016
Hi

Thanks for the information ,but the directory you have advised shows the log information and rrd file in perfdata folder delete very frequently and create new some thing like 123435335333.host...
My requirement is to know the list of parameter nagios required in order to create or show following things,

1 alarm data
2 performance data
3 device initialization[or discovery]
what are the parameters it ask from device or device return to nagios in order to make suffiecient data to plot performance data or alarms in nagios.

Please help me on this

Thanks

Re: Parameters stored by Nagios for the alarms/events receiv

Posted: Tue May 16, 2017 10:28 am
by tgriep
1. Alarm Data.
When a plugin is run by the Nagios system, the plugin returns a code. Depending on that code and the settings for the Host or service check, it will generate an alert.
Each plugin is unique in what is does to gather the information from the host or service it is checking.
In this link, take a look at the return codes and their meanings. Normally, when a plugin is ran, it is checked against the previous check and it the state has changed, that is when the alert in generated.
https://assets.nagios.com/downloads/nag ... inapi.html


2. Performance data

Plugins can return optional performance data in their output by sending the normal, human-readable text string that they usually would, followed by a pipe character (|), and then a string containing one or more performance data metrics. Let's take the check_ping plugin as an example and assume that it has been enhanced to return percent packet loss and average round trip time as performance data metrics. Sample output from the plugin might look like this:

PING ok - Packet loss = 0%, RTA = 0.80 ms | percent_packet_loss=0, rta=0.80

When Nagios Core sees this plugin output format it will split the output into two parts:
Everything before the pipe character "|" is considered to be the "normal" plugin output.
Everything after the pipe character "|" is considered to be the plugin-specific performance data.

The performance data is processed by the system and stored in the RRD files. The path from my previous post had the wrong path, the correct path is below.

Code: Select all

/usr/local/nagios/share/perfdata/<hostname>
3. device initialization[or discovery]
I will need more details on what you need for this.
Are you asking what the plugin is trying to gather from the host when it is run?

Take a look at the manual page for the plugins for their descriptions of what they are and what they check.
http://nagios-plugins.org/doc/man/index.html

Re: Parameters stored by Nagios for the alarms/events receiv

Posted: Mon May 22, 2017 2:03 am
by network2016
Hi

Thanks for the information. As per the 3.device initialization part ,I mean to say the device discovery for ex, nagios discover the network devices by using snmp method , so what parameters are asked from nagios from the device or what parameters are returned to nagios from the device . Where I can find the device discover parameters same as in case of alarm and performance data as mentioned by you.

For example, nagios discover the network switch say x.x.x.x ,and the data is somewhere stored in nagios or log information for the discovery of that event will be stored somewhere may be in some directory or in database ,so I would like to see that directory which have information on parameters returned for device initialization or discovery in nagios.

Please advise on this.

Regards

Re: Parameters stored by Nagios for the alarms/events receiv

Posted: Mon May 22, 2017 10:56 am
by tgriep
When you run the Network Switch / Router wizard, it stores the data when it polls the device in the /usr/local/nagios/tmp folder.
Take a look at the files that begin with mtrg- and you should see the data that is returned by the device.

Re: Parameters stored by Nagios for the alarms/events receiv

Posted: Tue May 23, 2017 5:40 am
by network2016
Hi

I did not find the temp folder in /usr/local/nagios folder, instead i found temp in nagiosxi folder but it does not have any file with mrtg- ,,Please advise on this . I am using nagiosXI

also please tell the files for
1 alarm data
2 performance data

,the files that I can download ,may be xml files and see what parameters it return

Please help me with correct directory for such files in NAGIOSXI


Thanks

Re: Parameters stored by Nagios for the alarms/events receiv

Posted: Tue May 23, 2017 8:36 am
by tgriep
Look in the /usr/local/nagiosxi/tmp folder. I had a typo in the previous post.

Re: Parameters stored by Nagios for the alarms/events receiv

Posted: Wed May 24, 2017 1:51 am
by network2016
Capture 1.PNG
hi this is my output of /usr/local/nagiosxi/tmp/ folder ,I cant found mrtg- files ,please advise

Re: Parameters stored by Nagios for the alarms/events receiv

Posted: Wed May 24, 2017 9:34 am
by tgriep
Which Wizard are you running on the Nagios XI server that you are concerned about how it gathers it's data from the remote systems using SNMP?