Perfdata problem

Randal, Phil phil.randal at hoopleltd.co.uk
Wed May 16 18:06:27 CEST 2012


That older perfdata problem is here:

http://tracker.nagios.org/view.php?id=247

Patch (untested) to always process perfdata (removing the early exits):

--- nagios/xdata/xpddefault.c   2012-02-07 10:15:02.000000000 +0000
+++ nagios/xdata/xpddefault.c   2012-05-16 16:48:44.000000000 +0100
@@ -382,6 +382,7 @@
         * bail early if we've got nothing to do so we don't spend a lot
         * of time calculating macros that never get used
         */
+       /*
        if(!svc || !svc->perf_data || !*svc->perf_data) {
                return OK;
                }
@@ -389,6 +390,7 @@
                return OK;
                }

+       */
        /*
         * we know we've got some work to do, so grab the necessary
         * macros and get busy
@@ -423,12 +425,14 @@
         * bail early if we've got nothing to do so we don't spend a lot
         * of time calculating macros that never get used
         */
+       /*
        if(!hst || !hst->perf_data || !*hst->perf_data) {
                return OK;
                }
        if((!xpddefault_host_perfdata_fp || !xpddefault_host_perfdata_file_template) && !xpddefault_host_perfdata_command) {
                return OK;
                }
+       */

        /* set up macros and get to work */
        memset(&mac, 0, sizeof(mac));

Icinga's solution was to add two new config variables:

https://dev.icinga.org/issues/1413

Cheers,

Phil
--
Phil Randal
Infrastructure Engineer
Hoople Ltd | Thorn Office Centre | Hereford HR2 6JT
Tel: 01432 260415 | Email: phil.randal at hoopleltd.co.uk

-----Original Message-----
From: Andreas Ericsson [mailto:ae at op5.se]
Sent: 16 May 2012 13:37
To: Nagios Users List
Subject: Re: [Nagios-users] Nagios 3.4.0 double quote in command bug (fixed)

On 05/15/2012 03:49 PM, Dennis Kuhlmeier wrote:
> Hi Phil,
>
> On 15.05.12 15:24, Randal, Phil wrote:
>> Hi Dennis,
>>
>> Can you check out Nagios 3.4.1 and see if this fixes the problem?
>>
>
> sorry for not checking prior to posting.
>
> Anyway, I built the new version, btw., why can't you just build the
> RPM from the tar? This is what I had to do on RHEL5:
>
>
> # tar xzf nagios-3.4.1.tar.gz
> # mv nagios nagios-3.4.1
> # cd nagios-3.4.1
> # vim nagios.spec
>    change "datarootdir" to "datadir" in configure statement # cd ..
> # tar czf nagios-3.4.1.tar.gz nagios-3.4.1/ # rpmbuild -tb
> nagios-3.4.1.tar.gz
>
> Tada, build works.
>
>
> Back to the problem.
> Installed the update, doesn't help. On my sample host with 31 checks
> only 18 get submitted via Perfdata. Back to nagios-3.2.3 again and all
> 31 checks are processed. Please tell me if you need any more details,
> performance data template configuration or something like that.
>

This is a slightly older bug about perfdata not being processed when there is no perfdata. I'll see if I get time to take a look at it.

--
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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
“Any opinion expressed in this e-mail or any attached files are those of the individual and not necessarily those of Hoople Ltd. You should be aware that Hoople Ltd. monitors its email service. This e-mail and any attached files are confidential and intended solely for the use of the addressee. This communication may contain material protected by law from being passed on. If you are not the intended recipient and have received this e-mail in error, you are advised that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. If you have received this e-mail in error please contact the sender immediately and destroy all copies of it.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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