[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nagios-users
Subject:    [Nagios-users] NDOUtils bug (resend)
From:       Andrey Dmitriev <netcomrade () dmitriev ! net>
Date:       2011-05-24 13:12:55
Message-ID: BANLkTim-GpG_dkexRfpJrzP-LSgL5Q6FMQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


we upgraded from
1.4b7 to 1.4b9
nagios version was upgraded from 2.x to 3.2.3

There is no way to correlate contact notified to notifications anymore since
the first that used to track it is now inserted with '0' all the time
(confirmed via debug mode)

the specific field is CONTACT_OBJECT_ID in NAGIOS_NAGIOSNOTIFICATIONS table.
there doesn't seem to be any other way to join the data in order to find out
who was contacted.

before upgrade (supporting query below)
| cs-pnslij             | HTTP-alt                              | Primary
       |               439 |
| cs-pnslij             | jboss_ConnectionCount                 |
cwhite_email     |               463 |
| cs-pnslij             | jboss_ConnectionCount                 |
cs_cwhite_pager  |               459 |
| cs-pnslij             | jboss_ConnectionCount                 |
cs_clee_pager    |               458 |
| cs-pnslij             | jboss_ConnectionCount                 |
cs_clee_email    |               457 |
| cs-pnslij             | jboss_ConnectionCount                 |
ashburn_ops      |               447 |
+-----------------------+---------------------------------------+------------------+-------------------+


after upgrade:
| mt-ora2        | nrpe-system_load           | NULL         |
  0 |
| mt-ora2        | nrpe-system_load           | NULL         |
  0 |



query:
SELECT
obj1.name1 AS host_name
,obj1.name2 AS service_description
,obj2.name1 AS contact_name
,nagios_contactnotifications.contact_object_id
FROM `nagios_contactnotifications`
JOIN nagios_notifications ON
nagios_contactnotifications.notification_id=nagios_notifications.notification_id
LEFT JOIN nagios_objects as obj1 ON
nagios_notifications.object_id=obj1.object_id
LEFT JOIN nagios_objects as obj2 ON
nagios_contactnotifications.contact_object_id=obj2.object_id
LEFT JOIN nagios_instances ON
nagios_notifications.instance_id=nagios_instances.instance_id
WHERE
nagios_notifications. start_time >= DATE_SUB(CURDATE(), interval 48 hour)
ORDER BY nagios_notifications.start_time DESC

[Attachment #5 (text/html)]

<meta http-equiv="content-type" content="text/html; charset=utf-8"><span \
class="Apple-style-span" style="font-family: arial, sans-serif; font-size: medium; \
"><table class="Bs nH iY" cellpadding="0" style="position: relative; \
-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; \
padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \
border-collapse: collapse; background-image: initial; background-attachment: initial; \
background-origin: initial; background-clip: initial; background-color: rgb(255, 255, \
255); width: 1467px; background-position: initial initial; background-repeat: initial \
initial; "> <tbody><tr><td class="Bu" style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; font-family: arial, sans-serif; vertical-align: \
top; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> \
<div class="nH if" style="padding-top: 0px; padding-right: 0px; padding-bottom: 1px; \
padding-left: 0px; "><div class="nH"><div class="nH hx" style="color: rgb(0, 0, 0); \
padding-top: 4px; padding-right: 8px; padding-bottom: 4px; padding-left: 8px; "> <div \
class="nH"><div class="nH"><div class="h7  ie" style="clear: both; padding-bottom: \
0px; "><div class="Bk" style="position: relative; margin-bottom: 10px; \
border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; \
border-top-style: solid; border-right-style: solid; border-bottom-style: solid; \
border-left-style: solid; border-top-color: rgb(239, 239, 239); border-right-color: \
rgb(239, 239, 239); border-left-color: rgb(239, 239, 239); border-bottom-color: \
rgb(226, 226, 226); border-top-width: 0px; border-top-left-radius: 7px 7px; \
border-top-right-radius: 7px 7px; border-bottom-right-radius: 7px 7px; \
border-bottom-left-radius: 7px 7px; width: 1218px; "> <div class="G3 G2" \
style="padding-top: 3px; background-color: rgb(255, 255, 255); border-right-width: \
1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: solid; \
border-bottom-style: solid; border-left-style: solid; border-right-color: rgb(188, \
188, 188); border-bottom-color: rgb(188, 188, 188); border-left-color: rgb(188, 188, \
188); border-top-width: 1px; border-top-style: solid; border-top-color: rgb(188, 188, \
188); border-top-left-radius: 7px 7px; border-top-right-radius: 7px 7px; \
border-bottom-right-radius: 7px 7px; border-bottom-left-radius: 7px 7px; "> <div \
class="nH"><div id=":6j"><div class="HprMsc"><div class="gs"><div id=":6h" class="ii \
gt" style="font-size: 13px; margin-top: 5px; margin-right: 15px; margin-bottom: 5px; \
margin-left: 15px; padding-bottom: 20px; position: relative; z-index: 2; "> <div \
id=":6i">we upgraded from <div>1.4b7 to 1.4b9</div><div>nagios version was upgraded \
from 2.x to 3.2.3</div><div><br></div><div>There is no way to correlate contact \
notified to notifications anymore since the first that used to track it is now \
inserted with &#39;0&#39; all the time (confirmed via debug mode)</div> \
<div><br></div><div>the specific field is CONTACT_OBJECT_ID in \
NAGIOS_NAGIOSNOTIFICATIONS table.</div><div>there doesn&#39;t seem to be any other \
way to join the data in order to find out who was contacted.</div><div><br> \
</div><div>before upgrade (supporting query below)</div><div><div>| cs-pnslij         \
| HTTP-alt                              | Primary          |               439 \
|</div><div>| cs-pnslij             | jboss_ConnectionCount                 | \
cwhite_email     |               463 |</div> <div>| cs-pnslij             | \
jboss_ConnectionCount                 | cs_cwhite_pager  |               459 \
|</div><div>| cs-pnslij             | jboss_ConnectionCount                 | \
cs_clee_pager    |               458 |</div> <div>| cs-pnslij             | \
jboss_ConnectionCount                 | cs_clee_email    |               457 \
|</div><div>| cs-pnslij             | jboss_ConnectionCount                 | \
ashburn_ops      |               447 |</div> \
<div>+-----------------------+---------------------------------------+------------------+-------------------+</div></div><div><br></div><div><br></div><div>after \
upgrade:</div><div><div>| mt-ora2        | nrpe-system_load           | NULL         \
|                 0 |</div> <div>| mt-ora2        | nrpe-system_load           | NULL \
|                 0 |</div></div><div><br></div><div><br></div><div><br></div><div>query:</div><div><div>SELECT \
</div><div>obj1.name1 AS host_name </div><div> ,obj1.name2 AS service_description \
</div><div>,obj2.name1 AS contact_name \
</div><div>,nagios_contactnotifications.contact_object_id</div><div>FROM \
`nagios_contactnotifications` </div><div>JOIN nagios_notifications ON  </div> \
<div>nagios_contactnotifications.notification_id=nagios_notifications.notification_id \
</div><div>LEFT JOIN nagios_objects as obj1 ON  \
</div><div>nagios_notifications.object_id=obj1.object_id </div><div>LEFT JOIN \
nagios_objects as obj2 ON  </div> \
<div>nagios_contactnotifications.contact_object_id=obj2.object_id </div><div>LEFT \
JOIN nagios_instances ON  \
</div><div>nagios_notifications.instance_id=nagios_instances.instance_id \
</div><div>WHERE </div><div>nagios_notifications. start_time &gt;= \
DATE_SUB(CURDATE(), interval 48 hour) </div> <div>ORDER BY \
nagios_notifications.start_time \
DESC</div></div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></td></tr></tbody></table></span>




------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1

_______________________________________________
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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic