<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.network.nagios.devel">
    <title>gmane.network.nagios.devel</title>
    <link>http://blog.gmane.org/gmane.network.nagios.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8340"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8339"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8338"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8337"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8336"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8335"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8334"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8333"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8332"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8331"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8330"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8329"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8328"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8327"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8326"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8325"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8324"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8323"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8322"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.network.nagios.devel/8321"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8340">
    <title>Re: Perl Module to Parse status.dat</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8340</link>
    <description>&lt;pre&gt;Having worked with status.dat in the past all I can say is. Don't. Install
mklivestatus ( http://mathias-kettner.de/checkmk_livestatus.html ) with the
CPAN module  http://search.cpan.org/~nierlein/Monitoring-Livestatus-0.74/ .




On Fri, May 25, 2012 at 9:34 AM, John &amp;lt;john&amp;lt; at &amp;gt;johnster.com&amp;gt; wrote:

------------------------------------------------------------------------------
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-devel mailing list
Nagios-devel&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
&lt;/pre&gt;</description>
    <dc:creator>Ian Orszaczki</dc:creator>
    <dc:date>2012-05-25T00:15:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8339">
    <title>Perl Module to Parse status.dat</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8339</link>
    <description>&lt;pre&gt;Hi All,

Could anyone point me towards / recommend perl module working with 
status.dat (if it exists), please?

Trying to be current ...v 3.4.x ...

Many Thanks,

- John

------------------------------------------------------------------------------
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/
&lt;/pre&gt;</description>
    <dc:creator>John</dc:creator>
    <dc:date>2012-05-24T23:34:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8338">
    <title>Re: nagiostats Config Parameters</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8338</link>
    <description>&lt;pre&gt;
Sounds like you've already done a large part of the analysis, so it might
be good if you did the patch as well.

&lt;/pre&gt;</description>
    <dc:creator>Andreas Ericsson</dc:creator>
    <dc:date>2012-05-24T09:30:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8337">
    <title>Re: nagiostats Config Parameters</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8337</link>
    <description>&lt;pre&gt;
To answer my own (implied) question:

base/nagiostats.c uses a different subroutine, read_nagiostats_file(),
to read and parse a status file named by the -s option; when parsing
nagios.cfg (default or -c option) and grabbing the value of the
status_file directive there, read_status_file() is used instead.

As far as I can tell, read_status_file() matches the current status.dat
syntax, while read_nagiostats_file() expects a format that plain isn't
to be found anywhere else anymore. For example, it's the only place in
the code where I can find the string "nagios_version", which it parses for.

The figure nagiostats outputs for NUMSVCOK (the one I focused on in my
last post - *not* the only one resulting in wrong numbers) is actually
*counted* in status.dat by read_status_file(), while
read_nagiostats_file() expects it to be *stated* as "services_ok" in the
file read; again, this seems to be the only place in the code where
"services_ok" appears *as a string* (rather than a variable of the same
name).

Any chance that the -s option might be reappropriated to read the
current status.dat files via read_status_file(), rather than a format
lost in the sands of time ... ?

Kind regards,
J. Bern
&lt;/pre&gt;</description>
    <dc:creator>Jochen Bern</dc:creator>
    <dc:date>2012-05-17T22:52:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8336">
    <title>NDOUtils 1.5.1 Available</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8336</link>
    <description>&lt;pre&gt;Version 1.5.1 of the NDOUtils add-on has now been released. You can 
download NDOUtils from:

https://sourceforge.net/projects/nagios/files/

Changelog follows...

       * Fixed off-by-one error packing data in ndomod.

Eric

&lt;/pre&gt;</description>
    <dc:creator>Eric Stanley</dc:creator>
    <dc:date>2012-05-17T11:20:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8335">
    <title>nagiostats Config Parameters</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8335</link>
    <description>&lt;pre&gt;Everyone,

I played with the "-c" and "-s" Parameters of a 3.2.3's nagiostats today
and noticed the odd behavior shown below. I didn't look at the source
yet, much less write a patch, but I thought you might want to check on
3.3.x and 3.4.x beforehand (and maybe extend t/705nagiostats.t a bit).

Kind regards,
J. Bern

Normal operation:

# N="/usr/local/nagios"
# $N/bin/nagiostats -m -d NUMSVCOK
1659


status.dat has been moved elsewhere (onto a ramdisk):

# strings - $N/bin/nagiostats | grep /nagios/
/usr/local/nagios/etc/nagios.cfg
/usr/local/nagios/var/status.dat
# grep /status.dat $N/etc/nagios.cfg
status_file=/usr/local/nagios/var/spool/status.dat
# strace $N/bin/nagiostats -m -d NUMSVCOK 2&amp;gt;&amp;amp;1 | \
open("/usr/local/nagios/etc/nagios.cfg", O_RDONLY) = 3
open("/usr/local/nagios/var/spool/status.dat", O_RDONLY) = 3


Specifying nagios.cfg explicitly works:

# $N/bin/nagiostats -c $N/etc/nagios.cfg -m -d NUMSVCOK
1659


Specifying status.dat explicitly - no go:

# $N/bin/nagiostats -s $N/var/spool/status.dat -m -d NUMSVCOK
0
# $N/bin/nagiostats -s$N/var/spool/status.dat -m -d NUMSVCOK
0
# $N/bin/nagiostats --statsfile $N/var/spool/status.dat -m -d NUMSVCOK
0
# $N/bin/nagiostats --statsfile=$N/var/spool/status.dat -m -d NUMSVCOK
0

(Doesn't work together with -c, either.)


It *does* read the status.dat, though:

# strace $N/bin/nagiostats -s $N/var/spool/status.dat -m -d NUMSVCOK \
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libm.so.6", O_RDONLY)        = 3
open("/lib/libc.so.6", O_RDONLY)        = 3
open("/usr/local/nagios/var/spool/status.dat", O_RDONLY) = 3

(... but where'd nagios.cfg go ... ?)
&lt;/pre&gt;</description>
    <dc:creator>Jochen Bern</dc:creator>
    <dc:date>2012-05-11T19:34:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8334">
    <title>Nagios Core 3.4.0 - performance data issues ifcontain apostrophes</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8334</link>
    <description>&lt;pre&gt;Hi list,

i'm having an odd problem with the development machine I installed  
Nagios Core 3.4.0 to.

It took me some time to make sure what the problem acutally is, but  
there must have some change in the performance data handling.

For my setup:
It's two machines running CentOS 5.8 x64, the production-machine is  
Nagios Core 3.3.1 and the development machine is Nagios Core 3.4.0,  
both have the same versions of other packages both have PNP-0.6.17 and  
both have nagios-plugins-1.4.15 - and both have the exact same config  
(except the dev-machine doesn't send email to everyone).

So far about the basics.

I'm having the problem with the check_snmp and check_nt scripts, if  
there is a label (on check_snmp) or a counter (on check_nt) with  
blanks and it's therefor in apostrophes.

So that means, that Nagios is still checking the state of the checks,  
but there is no performance data handled by PNP, as the input is  
invalid.

Let me explain that with an example:

This checks the environment temperature sensor of APC UPS.

______
command_line$USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o  
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.4.1 -w 29 -c 40 -l 'environment  
Temperature' -u °C
______
as you can see the label "-l 'environment Temperature'" is set in apostrophes.


If that check is run by Nagios 3.3.1 it looks like follows in Service  
State Information window:

_____
Status Information:SNMP OK - environment Temperature 24 °C
Performance Data:environment Temperature=24
_____


If that exact same check is run by Nagios 3.4.0 it looks like:

_____
Status Information:SNMP OK - 24 °C
Performance Data:=24
_____
So Nagios is still recognizing the value and handling the  
notifications and escalations as it should, but "=24" is sent to PNP  
as performance data, what clearly is invalid.

In production system (Nagios Core 3.3.1 - PNP-0.6.17) perfdata.log tells:

_____
Found Performance Data for APC_5000XL / Environment-Temperature  
(environment Temperature=24)
_____
and is put into the graph just fine.

In development system (Nagios Core 3.4.0 - same PNP-version!) it is:

_____
Found Performance Data for APC_5000XL / Environment-Temperature (=24)
Invalid Perfdata detected
_____

So Nagios 3.4.0 is doing something to the performance data.
The only possibility to change that behavior back to normal is to  
change the check-command to anything valid without apostrophes, like:

______
command_line$USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o  
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.4.1 -w 29 -c 40 -l Temperature -u °C
______
but that's not what I'd call "solution".

I downgraded the development system to 3.3.1 and instantly that checks  
were reported correctly and graphs are drawn.
Back to 3.4.0 that stops immediately.

Does anyone else have registered such behaviour or can this be  
confirmed as a bug?
Maybe I'm having blinders for changes that were clearly  
communicated... or am missing some major point, so please tell me.

I would appreciate any help or confirmation that this is a bug and  
will be fixed in further releases.

If you have any further queries, please do not hesitate to contact me.

cheers

------------------------------------------------------------------------------
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/
&lt;/pre&gt;</description>
    <dc:creator>shells&lt; at &gt;wannabepunk.de</dc:creator>
    <dc:date>2012-05-10T14:23:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8333">
    <title>Re: [Nagios-users] Any upcoming release?</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8333</link>
    <description>&lt;pre&gt;Bleh. It's too late and to sit up and rebase 160-odd patches on top of
20 to fix a single broken one.

For those using the 3.4.0 release, I've cherry-picked all patches that
went in the 3.4.0-release apart from the broken execvp patch and added
them on top of the worker-process code.

If anyone's interested in trying them out, you can get them from
git://github.com/ageric/nagios.git or possibly get a snapshot somewhere
at https://github.com/ageric/nagios

Consider it 3.5.0-alpha or something. It still needs a lot of testing,
but it's been ticking along quite nicely in our lab the past 4 months,
running checks and generally just working with livestatus and Merlin
enabled.

Granted, that part of our lab doesn't use passive check results, but
most of the rest is tested and known to work pretty well, apart from
the small memory leak mentioned below (but who knows? Someone might
even fix that now that it's in the open).

Happy testing.

I'll get a proper fix in for the double-quote issue on friday, as I've
got presentations to run all day tomorrow.


On 05/09/2012 09:53 PM, Andreas Ericsson wrote:


&lt;/pre&gt;</description>
    <dc:creator>Andreas Ericsson</dc:creator>
    <dc:date>2012-05-09T21:43:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8332">
    <title>Re: Passive checks number of ettempts error</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8332</link>
    <description>&lt;pre&gt;Hi Stephen,

Thank you for your answer. However I don´t agree when you say that I´m
losing updates. We can see by the alert times that the collector sent a
SOFT3 status at
01:05:21 h and the central server consider it a HARD4 at 01:05:40 h. For me
it is a bug in the passive check process.

I´m using NSCA to replicate the status from the collectors to central
server and as you said the central server takes about 20 seconds to get the
status sent by the collectors, what is a normal behavior, I think.

Thank you very much,
Rodney

On Tue, May 8, 2012 at 5:01 PM, Stephen Gran &amp;lt;steve&amp;lt; at &amp;gt;lobefin.net&amp;gt; wrote:

------------------------------------------------------------------------------
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-devel mailing list
Nagios-devel&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
&lt;/pre&gt;</description>
    <dc:creator>Rodney Ramos</dc:creator>
    <dc:date>2012-05-09T12:50:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8331">
    <title>Re: Passive checks number of ettempts error</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8331</link>
    <description>&lt;pre&gt;On Tue, May 08, 2012 at 12:07:05PM -0300, Rodney Ramos said:

Hi,


You're losing updates.  Given that it seems to be taking 15 or 20
seconds to get the update from your collector to your central server,
that's not hugely surprising.  You don't say what the replication
mechanism is, but it either needs to get better at shovelling updates or
grow a bigger buffer, at a guess.

Cheers,
&lt;/pre&gt;</description>
    <dc:creator>Stephen Gran</dc:creator>
    <dc:date>2012-05-08T20:01:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8330">
    <title>Passive checks number of ettempts error</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8330</link>
    <description>&lt;pre&gt;Hi everybody,

I use Nagios, release 3.2.3, in a distributed environment, with a central
server and several colector servers.

For a long time I´m seeing errors on the passive check mechanism on the
central server, as we can see below.

Sometimes, on the central server, the states and number of attempts don´t
follow the correct order, going from SOFT2 to HARD4, for example. However,
on the colector server everything is OK.

Log from Central Server:
Host Up[2012-05-05 01:06:48] HOST ALERT: node;UP;HARD;1;TCP OK - 0.005
second response time on port 135
Host Down[2012-05-05 01:05:40] HOST ALERT: node;DOWN;HARD;4;CRITICAL -
Socket timeout after 10 seconds
Host Down[2012-05-05 01:04:16] HOST ALERT: node;DOWN;SOFT;2;CRITICAL -
Socket timeout after 10 seconds
Host Down[2012-05-05 01:02:55] HOST ALERT: node;DOWN;SOFT;1;CRITICAL -
Socket timeout after 10 seconds

Log from Colector Server:
Host Up[05-05-2012 01:06:31] HOST ALERT: node;UP;SOFT;4;TCP OK - 0.005
second response time on port 135
Host Down[05-05-2012 01:05:21] HOST ALERT: node;DOWN;SOFT;3;CRITICAL -
Socket timeout after 10 seconds
Host Down[05-05-2012 01:04:01] HOST ALERT: node;DOWN;SOFT;2;CRITICAL -
Socket timeout after 10 seconds
Host Down[05-05-2012 01:02:41] HOST ALERT: nodeDOWN;SOFT;1;CRITICAL -
Socket timeout after 10 seconds

Has anybody seen this kind of problem? Can someone help me?

Thanks.
------------------------------------------------------------------------------
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-devel mailing list
Nagios-devel&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
&lt;/pre&gt;</description>
    <dc:creator>Rodney Ramos</dc:creator>
    <dc:date>2012-05-08T15:07:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8329">
    <title>Re: Customized macros not working for contacts</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8329</link>
    <description>&lt;pre&gt;Jochen, 

Thanks. Yes, I can create another template and add that as you suggest. I'd hoped to keep contacts defined within a contact definition and since it's documented that it should work .... 

But I'll try it out as you suggest and go from there. 

Regards,
Deborah 
Frustration=Finding something that you want to use documented only to find out it doesn't work! 

-----Original Message-----
From: Jochen Bern [mailto:Jochen.Bern&amp;lt; at &amp;gt;LINworks.de] 
Sent: 04 May 2012 16:02
To: Nagios Developers List
Cc: Deborah Martin
Subject: Re: [Nagios-devel] Customized macros not working for contacts

On 05/04/2012 04:28 PM, Deborah Martin wrote:

FWIW, you have a major systematic problem there. Event handlers are triggered *once* per service (and event), while said service can have
*any* number of contacts with their individual sets of Custom Macros. In your example, the service may have exactly one contact, but that's something Nagios would need to learn to check for to ever even get the idea that Contact Custom Macros might be well-defined in your Event Handler.

Hence, I'ld even say that *Service* Custom Macros is where your additional data *belongs*.

You are aware that you can reference *several* templates, as in "use dbcon-service,special-contact-template", to combine perpendicular default settings?

http://nagios.sourceforge.net/docs/3_0/objectinheritance.html
(Scroll to end of page)

Kind regards,
J. Bern
--
Jochen Bern, Systemingenieur --- LINworks GmbH &amp;lt;http://www.LINworks.de/&amp;gt; Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27 Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202 Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel


This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.  If you are not the intended recipient, please delete this e-mail immediately.  Any unauthorised distribution or copying is strictly prohibited.

Whilst Kognitio endeavours to prevent the transmission of viruses via e-mail, we cannot guarantee that any e-mail or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Kognitio grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.
------------------------------------------------------------------------------
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-devel mailing list
Nagios-devel&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
&lt;/pre&gt;</description>
    <dc:creator>Deborah Martin</dc:creator>
    <dc:date>2012-05-04T15:44:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8328">
    <title>Re: Customized macros not working for contacts</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8328</link>
    <description>&lt;pre&gt;
FWIW, you have a major systematic problem there. Event handlers are
triggered *once* per service (and event), while said service can have
*any* number of contacts with their individual sets of Custom Macros. In
your example, the service may have exactly one contact, but that's
something Nagios would need to learn to check for to ever even get the
idea that Contact Custom Macros might be well-defined in your Event Handler.

Hence, I'ld even say that *Service* Custom Macros is where your
additional data *belongs*.

You are aware that you can reference *several* templates, as in "use
dbcon-service,special-contact-template", to combine perpendicular
default settings?

http://nagios.sourceforge.net/docs/3_0/objectinheritance.html
(Scroll to end of page)

Kind regards,
J. Bern
&lt;/pre&gt;</description>
    <dc:creator>Jochen Bern</dc:creator>
    <dc:date>2012-05-04T15:01:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8327">
    <title>Re: Customized macros not working for contacts</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8327</link>
    <description>&lt;pre&gt;Hi Paul, 

I don’t think that will be feasible. 

I have 10 template service definitions and these all contain static settings

Then for each customer, I define a service definition referencing that template and overriding only the parameters that are applicable to a specific customer such as the contact-group, 
host_name etc etc 

So for example, my template is defined below :- 

define service{
        name                            dbcon-service ; The 'name' of this service template, referenced in other service definitions
        active_checks_enabled           1       ; Active service checks are enabled
        passive_checks_enabled          1       ; Passive service checks are enabled/accepted
        parallelize_check               1       ; Active service checks should be parallelized (disabling this can lead to major
                                                ; performance problems)
        obsess_over_service             1       ; We should obsess over this service (if necessary)
        check_freshness                 0       ; Default is to NOT check service 'freshness'
        notifications_enabled           0       ; Service notifications are enabled
        event_handler_enabled           1       ; Service event handler is enabled
        flap_detection_enabled          1       ; Flap detection is enabled
        process_perf_data               1       ; Process performance data
        retain_status_information       1       ; Retain status information across program restarts
        retain_nonstatus_information    1       ; Retain non-status information across program restarts
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        notification_interval           240
        notification_period             24x7
        notification_options            n       ; Notifications are not sent out
        servicegroups                   dns
        check_period                    24x7
         is_volatile                     0
        register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
        }

And then I define a service using that template, adding anything else that is specific to that customer :- 

define service{
        use                     dbcon-service
        active_checks_enabled   1          ; Active service checks are enabled
        host_name               &amp;lt;specific-host&amp;gt;  ; Usually the first wx2 node
        normal_check_interval   5
        service_description     DB Connection for Specific client; Uppercase
        check_command           check_wx2_conn!$HOSTALIAS$   
        contact_groups          specific-contact-group 
        max_check_attempts      3 ; Changed from default of 1 to try and reduce Service check Timeout alerts
        notification_interval   10
        retry_check_interval    1;
        check_period            24x7 ; 24x7 monitoring
        notification_period     24x7 ; 24x7 monitoring
        }

define contactgroup{
        contactgroup_name       specific-contact-group
        alias                   Administrators
        members                 specific-contact-admin
                }

define contact{
        contact_name                    specific-contact-admin
        alias                           specific-contact-admin
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands   notify-by-email
        host_notification_commands      host-notify-by-email
        email                           specificcontact&amp;lt; at &amp;gt;kognitio.com
       _EMAILCONTACTID deborah.martin&amp;lt; at &amp;gt;kognitio.com  
        }

So, as you can see I have a contact group defined in my service definition which is based on my contactgroup definition etc etc 

This contact-group is the same group used across about 60 service definitions so I only had to define this *once* in my contacts.cfg file. 
I wanted to then add a customized macro to the same contacts definition  so that I can parse that to an event handler but this doesn't work. 

So my eventhandler would parse $SERVICESTATEID$ $HOSTALIAS$ and $_EMAILCONTACTID 

And in my eventhandler, I would have a line something like "echo &amp;lt;results&amp;gt; | mailx -s "Results from $NAGIOS_HOSTALIAS" $NAGIOS__CONTACTEMAILCONTACTID 

So I've only defined the $_EMAILCONTACTID once (per customer contact) in my contacts.cfg file which can then be used, in this case by the 60 service definitions that use event handlers 

So hopefully, you'll see why this is really useful to make it work in the contact definition rather the service definition ? 

Regards,
Deborah 

----Original Message-----
From: Paul Dubuc [mailto:work&amp;lt; at &amp;gt;paul.dubuc.org] 
Sent: 04 May 2012 14:01
To: Nagios Developers List
Cc: Deborah Martin
Subject: Re: [Nagios-devel] Customized macros not working for contacts

Is is feasible to define the macro in a service template definition that your other service definitions use to get the value for the command-line parameter?

Deborah Martin wrote:



This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.  If you are not the intended recipient, please delete this e-mail immediately.  Any unauthorised distribution or copying is strictly prohibited.

Whilst Kognitio endeavours to prevent the transmission of viruses via e-mail, we cannot guarantee that any e-mail or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Kognitio grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.
------------------------------------------------------------------------------
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-devel mailing list
Nagios-devel&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
&lt;/pre&gt;</description>
    <dc:creator>Deborah Martin</dc:creator>
    <dc:date>2012-05-04T14:28:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8326">
    <title>Re: Customized macros not working for contacts</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8326</link>
    <description>&lt;pre&gt;Is is feasible to define the macro in a service template definition that your 
other service definitions use to get the value for the command-line parameter?

Deborah Martin wrote:


------------------------------------------------------------------------------
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/
&lt;/pre&gt;</description>
    <dc:creator>Paul Dubuc</dc:creator>
    <dc:date>2012-05-04T13:01:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8325">
    <title>Re: Customized macros not working for contacts</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8325</link>
    <description>&lt;pre&gt;Andreas, 

It doesn't work if I define a customized macro in the contact definition and try to use it at all! 

That means as a macro or as an environment variable. 

If I move the customized macro to my service definition then both work. 

The docs say this is supported so I believe this should be fixed. My configuration "is in the real world" and therefore would be very useful. As it's for use with an event handler I can't believe that it will have that much of a performance impact as the only time when the event handler needs to send out results is on a critical alert and that is based on certain criteria being met. 

Having the macro defined in the contact definition instead of the service definition is the difference between updating 1 contacts.cfg file which contain 30 different contacts versus updating 100's of service definitions where there is around 10 services for every contact. 

Regards,
Deborah 


-----Original Message-----
From: Andreas Ericsson [mailto:ae&amp;lt; at &amp;gt;op5.se] 
Sent: 04 May 2012 12:25
To: Deborah Martin
Cc: Nagios Developers List
Subject: Re: [Nagios-devel] Customized macros not working for contacts

On 05/03/2012 04:58 PM, Deborah Martin wrote:

Use the macro as a command-line parameter from Nagios' config. From
what I read in your original mail, that seemed to work well, no?

&lt;/pre&gt;</description>
    <dc:creator>Deborah Martin</dc:creator>
    <dc:date>2012-05-04T12:30:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8324">
    <title>Re: Customized macros not working for contacts</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8324</link>
    <description>&lt;pre&gt;
Use the macro as a command-line parameter from Nagios' config. From
what I read in your original mail, that seemed to work well, no?

&lt;/pre&gt;</description>
    <dc:creator>Andreas Ericsson</dc:creator>
    <dc:date>2012-05-04T11:25:02</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8323">
    <title>Re: Customized macros not working for contacts</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8323</link>
    <description>&lt;pre&gt;No - that was a typo on my part. 

In both test cases there were two underscores. 


Regards,
Deborah 

-----Original Message-----
From: eponymous alias [mailto:eponymousalias&amp;lt; at &amp;gt;yahoo.com] 
Sent: 03 May 2012 17:01
To: Nagios Developers List
Cc: Deborah Martin
Subject: Re: [Nagios-devel] Customized macros not working for contacts




Something is odd about the way you've written those names.
One has two underscores, the other has one.  Might that have something to do with the failure you see?


This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.  If you are not the intended recipient, please delete this e-mail immediately.  Any unauthorised distribution or copying is strictly prohibited.

Whilst Kognitio endeavours to prevent the transmission of viruses via e-mail, we cannot guarantee that any e-mail or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. Kognitio grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.
------------------------------------------------------------------------------
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-devel mailing list
Nagios-devel&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
&lt;/pre&gt;</description>
    <dc:creator>Deborah Martin</dc:creator>
    <dc:date>2012-05-04T07:27:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8322">
    <title>Re: Customized macros not working for contacts</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8322</link>
    <description>&lt;pre&gt;


Something is odd about the way you've written those names.
One has two underscores, the other has one.  Might that have
something to do with the failure you see?

------------------------------------------------------------------------------
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-devel mailing list
Nagios-devel&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
&lt;/pre&gt;</description>
    <dc:creator>eponymous alias</dc:creator>
    <dc:date>2012-05-03T16:01:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8321">
    <title>Re: Customized macros not working for contacts</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8321</link>
    <description>&lt;pre&gt;Thanks Andreas, 

Yes for both settings 

I do see your point about a fix. It's a shame because setting this in the contact definition would have made some event handlers easier to write. 

At the moment my event handler has to be customized per customer to get the right email contacts but if I could define a customized macro in the contact definition, I only need 
use that in my event handler script and then I don't need to worry about a different event handler per customer making it as generic as possible. 
Things like warning and critical thresholds are parsed based on customer requirements rather than hardcoded so I was hoping I could do that with contacts. 

Is there a different way of achieving this ? 

Regards,
Deborah 


-----Original Message-----
From: Andreas Ericsson [mailto:ae&amp;lt; at &amp;gt;op5.se] 
Sent: 03 May 2012 15:46
To: Nagios Developers List
Cc: Deborah Martin
Subject: Re: [Nagios-devel] Customized macros not working for contacts

On 05/03/2012 12:42 PM, Deborah Martin wrote:

Are environment macros are turned on and large_installation_tweaks turned off? Otherwise, it's not supposed to work.


When someone sends in a patch, or when Eric and Ethan finds time to work on this. Environment macros are nifty to use in small installs but the performance penalty associated with them along with the weird errors that occur in large installations with many large groups of objects make them unsuitable for real-world usage, so I prefer to deter people from using them rather than fixing any problems with them (since the most severe problems just aren't fixable).

&lt;/pre&gt;</description>
    <dc:creator>Deborah Martin</dc:creator>
    <dc:date>2012-05-03T14:58:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.network.nagios.devel/8320">
    <title>Re: Customized macros not working for contacts</title>
    <link>http://permalink.gmane.org/gmane.network.nagios.devel/8320</link>
    <description>&lt;pre&gt;
Are environment macros are turned on and large_installation_tweaks
turned off? Otherwise, it's not supposed to work.


When someone sends in a patch, or when Eric and Ethan finds time to
work on this. Environment macros are nifty to use in small installs
but the performance penalty associated with them along with the weird
errors that occur in large installations with many large groups of
objects make them unsuitable for real-world usage, so I prefer to
deter people from using them rather than fixing any problems with them
(since the most severe problems just aren't fixable).

&lt;/pre&gt;</description>
    <dc:creator>Andreas Ericsson</dc:creator>
    <dc:date>2012-05-03T14:46:06</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.network.nagios.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.network.nagios.devel</link>
  </textinput>
</rdf:RDF>

