[Nagios-devel] Patch for ndoutils-1.4b9 contact_name
Posted: Thu Aug 18, 2011 6:47 am
--------------090707040204020303020706
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Hi.
This is my first post on the list so: Hello everybody!
In ndoutils 1.4b9 the contact name for notifications is not provided.
New entries for table nagios_contactnotifications and contact_object_id
results into 0.
The ndo dump looks like this (attribute 134 is empty):
220:
1=603
2=0
3=0
4=1311855238.314743
89=1
117=1311855238.169753
33=1311855238.314738
53=YYYYYYYYY
114=YYYYYYYYYY-XXXXXXXXXX
134=
87=0
118=1
95=test1
125=test1
95=test1
5=
6=
999
I attached a patch which changes the array keys used in
ndomod_broker_data to resolve that issue. Maybe this helps.
Kind regards,
Marius.
--------------090707040204020303020706
Content-Type: text/x-patch; name="patch_contact_name.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="patch_contact_name.diff"
--- ndoutils-1.4b9/src/ndomod.c
+++ ndoutils-1.4b9/src/ndomod.c
@@ -2803,7 +2803,7 @@ int ndomod_broker_data(int event_type, v
,NDO_DATA_SERVICE
,(es[1]==NULL)?"":es[1]
,NDO_DATA_CONTACTNAME
- ,(es[5]==NULL)?"":es[5]
+ ,(es[7]==NULL)?"":es[7]
,NDO_DATA_NOTIFICATIONREASON
,cnotdata->reason_type
,NDO_DATA_STATE
--------------090707040204020303020706--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Hi.
This is my first post on the list so: Hello everybody!
In ndoutils 1.4b9 the contact name for notifications is not provided.
New entries for table nagios_contactnotifications and contact_object_id
results into 0.
The ndo dump looks like this (attribute 134 is empty):
220:
1=603
2=0
3=0
4=1311855238.314743
89=1
117=1311855238.169753
33=1311855238.314738
53=YYYYYYYYY
114=YYYYYYYYYY-XXXXXXXXXX
134=
87=0
118=1
95=test1
125=test1
95=test1
5=
6=
999
I attached a patch which changes the array keys used in
ndomod_broker_data to resolve that issue. Maybe this helps.
Kind regards,
Marius.
--------------090707040204020303020706
Content-Type: text/x-patch; name="patch_contact_name.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="patch_contact_name.diff"
--- ndoutils-1.4b9/src/ndomod.c
+++ ndoutils-1.4b9/src/ndomod.c
@@ -2803,7 +2803,7 @@ int ndomod_broker_data(int event_type, v
,NDO_DATA_SERVICE
,(es[1]==NULL)?"":es[1]
,NDO_DATA_CONTACTNAME
- ,(es[5]==NULL)?"":es[5]
+ ,(es[7]==NULL)?"":es[7]
,NDO_DATA_NOTIFICATIONREASON
,cnotdata->reason_type
,NDO_DATA_STATE
--------------090707040204020303020706--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]