How BrainyPDM collect nagios performance data

By Nico Bagari, on 02-08-2008

Favoured : 50

Published in : Documentation, Architecture documentation

Copyright (c) 2008 Nico Bagari & Thomas Buffagni
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".




BrainyPDM collect Nagios Peformance Data with Nagios Module(see BrainyPDM Architecture).

When comunication from Nagios and BrainyPDM is established BrainyPDM parse a line like this:

1217662225||localhost||OK||0.015||disk-usage||DISK OK - free space: / 12313 MB (17%): /dev/shm 496 MB (100%):||/ = 60838MB;73091;73121;0;73151 /dev/shm = 0MB;436;466;0;496


The Nagios output line definition is based on Nagios Macro and BrainyPDM want this definition:


"$LASTSERVICECHECK$||$HOSTNAME$||$SERVICESTATE$||$SERVICEEXECUTIONTIME$||$SERVICEDESC$||

$SERVICEOUTPUT$||$SERVICEPERFDATA$"


The Nagios Module parsing of nagios output is based onĀ  plug-in. When BrainyPDM start, Nagios Module load all plug-in definition from file $BRAINY_HOME/plugins/nagios/nagios-def.xml
A single line is parsed with all plug-in; if some performance data are found, Nagios Module call DataStore Module and save it.

You can add a lot of behaviour to your plug-in:

- setting idle: the plug-in don't works so the line is not parsed from it
- test your personal plug-in: the line is parsed but all performance data found are only logged and not stored
- filter on service name: only nagios line with service name that match with filter are parsed
- filter on host name: only nagios line with host name that match with filter are parsed
- parsing macro $SERVICEOUTPUT$ or $SERVICEPERFDATA$ or both: some plug-in write performance data in $SERVICEOUTPUT$
and not in $SERVICEPERFDATA$, so you can use this feature.
- overwrite performance data parsed from another plug-in (overwriteOrder): if two or more plug-in in the same line, found the same performance data, then is the plug-in with lesser value of overwriteOrder that store the value.
- other ...

You can use the default plug-in or you can create it if you want; the default plug-in are very powerful because found the generic definition of performance data: label=value[UOM];[warn];[crit];[min];[max]

Also, You can add another plug-in definition based on org.brainypdm.plugins.nagios.RegExpr
that use regular expression.

Let me show this example.
- Nagios send the line show below:

1217662225||localhost||OK||0.015||disk-usage||DISK OK - free space: / 12313 MB (17%): /dev/shm 496 MB (100%):||/ = 60838MB;73091;73121;0;73151 /dev/shm = 0MB;436;466;0;496


- Nagios Module have loaded this definition (default list of plug-in definition):

- PING
- LoadAvarage
- DefaultPerformanceData

- Nagios Module perform this step:
- don't parse the line with PING plug-in becouse the service name ($SERVICEDESC$) don't match with serviceFilter definition
- parse the line with LoadAvarage but don't find performance data becouse the $SERVICEPERFDATA$ don't match with the regular expression
- parse the line with DefaultPerformanceData and found performance data / and /dev/shm and store their value.


For any suggestion, please, contact us.
Thank you.

Last update : 02-08-2008

   
Favoured
Print
Send to friend
Related articles

Users' Comments  RSS feed comment
 

Average user rating

 


Add your comment
Name
E-mail
Title  
Comment
 
Available characters: 600
   Notify me of follow-up comments
  Mathguard security question:
9YO          3       
  F    T    YE    ENY
  Y   HUQ    T       
  9    Q     O    5YQ
  M         P7I      
   
   

No comment posted



mXcomment 1.0.8 © 2007-2010 - visualclinic.fr
License Creative Commons - Some rights reserved
How BrainyPDM collect nagios performance data
User Rating: / 1
PoorBest