NAGIOS 3: Adjusting fields which appear in the default nagios log

Marc Powell lists at xodus.org
Wed Mar 17 13:15:07 CET 2010


On Mar 17, 2010, at 5:29 AM, Traiano Welcome wrote:

> Hi All
> 
> I’m sending nagios logs to a 3rd party application (Netcool) for processing, and there is a requirement for the IP address of the monitored device to appear in the ALERT and NOTIFY log lines for host and service statuses. Where would I adjust which fields appear in the nagios log lines?
> 
> A typical host ALERT log line on my installation looks like this:
> 
> ---
> Mar 17 11:51:42 nagserver nagios: HOST ALERT: <hostname-x>;UP;SOFT;2;PING OK - Packet loss = 0%, RTA = 260.81 ms

There are many components of nagios that rely on the format of these log lines. You'll need to touch all of them if you intend to keep them working. A simple grep to get you started --

$ grep -rl "HOST ALERT" *
base/logging.c
cgi/summary.c
cgi/avail.c
cgi/history.c
cgi/showlog.c
cgi/histogram.c
cgi/trends.c

Perhaps a better/more flexible/more scalable solution would be to write your own event broker module that creates it's own log file (or other integration with netcool) in the format you need.

--
Marc
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list