Re: [Nagios-users] nagios and local syslog
Marc Powell wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:nagios-users- [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, October 12, 2007 5:31 PM To: [EMAIL PROTECTED] Cc: nagios-users@lists.sourceforge.net Subject: Re: [Nagios-users] nagios and local syslog Hi I think it would be very good to implement it on syslog . As nagios is written in C language , I think i's just syslog function arguments to change . Doesn't look like it's _quite_ that simple. The syslogging is done in base/logging.c in the write_to_syslog function. The code specifies the log levels (USER and INFO), but does not specify the facility to use, relying on the default syslog facility to catch it. From man 3 syslog, an openlog call needs to be added to specify the log facility to use for subsequent syslog() calls. LOG_USER is the facility. LOG_INFO is the severity. openlog() is only used to set a default facility in case one isn't passed to the syslog() function. The code (in glibc's syslog() function) should look something like this: if (!(priority 0x3f8)) priority |= default_priority; except that 0x3f8 is a macro called LOG_FACMASK. -- Andreas Ericsson [EMAIL PROTECTED] OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] nagios and local syslog
Andreas Ericsson wrote: Marc Powell wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:nagios-users- [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, October 12, 2007 5:31 PM To: [EMAIL PROTECTED] Cc: nagios-users@lists.sourceforge.net Subject: Re: [Nagios-users] nagios and local syslog Hi I think it would be very good to implement it on syslog . As nagios is written in C language , I think i's just syslog function arguments to change . Doesn't look like it's _quite_ that simple. The syslogging is done in base/logging.c in the write_to_syslog function. The code specifies the log levels (USER and INFO), but does not specify the facility to use, relying on the default syslog facility to catch it. From man 3 syslog, an openlog call needs to be added to specify the log facility to use for subsequent syslog() calls. LOG_USER is the facility. LOG_INFO is the severity. openlog() is only used to set a default facility in case one isn't passed to the syslog() function. The code (in glibc's syslog() function) should look something like this: if (!(priority 0x3f8)) priority |= default_priority; except that 0x3f8 is a macro called LOG_FACMASK. And to reply to the original poster: It's really quite trivial to add that precise functionality to nagios, but as I've got more pressing things to do, I'll leave the hacking as an exercise to you. It'll make you feel good when you're done. ;-) -- Andreas Ericsson [EMAIL PROTECTED] OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] nagios and local syslog
Hi I think it would be very good to implement it on syslog . As nagios is written in C language , I think i's just syslog function arguments to change . Does anybody know where I can make this suggestion to nagios developers ? Olivier Dennis Hünseler a écrit : Hi Oliver, one possibilty would be to use syslog-ng and define a filter which matches Nagios and seperate it this way. kind regards, Dennis Hello I want to log nagios to syslog using a specific local (example LOCAL7) I didn't find any options in nagios.cfg to do such a thing. Is anyone know how to do it ? By default , logs arrive in /val/log/messages file . nagios 3.0b3 os : redhat ES4 Olivier - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@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 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] nagios and local syslog
-Original Message- From: [EMAIL PROTECTED] [mailto:nagios-users- [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, October 12, 2007 5:31 PM To: [EMAIL PROTECTED] Cc: nagios-users@lists.sourceforge.net Subject: Re: [Nagios-users] nagios and local syslog Hi I think it would be very good to implement it on syslog . As nagios is written in C language , I think i's just syslog function arguments to change . Doesn't look like it's _quite_ that simple. The syslogging is done in base/logging.c in the write_to_syslog function. The code specifies the log levels (USER and INFO), but does not specify the facility to use, relying on the default syslog facility to catch it. From man 3 syslog, an openlog call needs to be added to specify the log facility to use for subsequent syslog() calls. Does anybody know where I can make this suggestion to nagios developers ? nagios-devel. You can subscribe from http://www.nagios.org. -- Marc - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@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
[Nagios-users] nagios and local syslog
Hello I want to log nagios to syslog using a specific local (example LOCAL7) I didn't find any options in nagios.cfg to do such a thing. Is anyone know how to do it ? By default , logs arrive in /val/log/messages file . nagios 3.0b3 os : redhat ES4 Olivier - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] nagios and local syslog
Hi Oliver, one possibilty would be to use syslog-ng and define a filter which matches Nagios and seperate it this way. kind regards, Dennis Hello I want to log nagios to syslog using a specific local (example LOCAL7) I didn't find any options in nagios.cfg to do such a thing. Is anyone know how to do it ? By default , logs arrive in /val/log/messages file . nagios 3.0b3 os : redhat ES4 Olivier - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@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 - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Nagios-users mailing list Nagios-users@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