Re: [Nagios-devel] Question,
Posted: Fri Nov 05, 2010 8:21 pm
This is a multi-part message in MIME format.
--------------050302000204040004040306
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 11/05/2010 05:30 PM, Michael Friedrich wrote:
> Jochen Bern wrote:
>> I'll save myself an 0x3e8 words and provide a screenshot instead.
> 3. sounds interesting.
Last one for today / this week ...
# SERVICE STATES TO ANNOTATE WITH CURRENT NOTIFICATION NO.
# Set this to an OR of the service state identifiers for
# which status.cgi should not only report "Attempts" (e.g.,
# "3/3" for a HARD non-OK state with max_check_attempts=3D3)
# but also the current notification number ("(#0)" if no
# problem notification has been sent yet, etc.). This is
# helpful to identify services which switched between
# different non-OK states a lot, or services which have a
# first_notification_delay set and are "not yet officially"
# considered in trouble.
[...]
# You'll likely want to use add_notif_num_hard=3D0 (default)
# or add_notif_num_hard=3D28 (warn+crit+unknown). There's an
# add_notif_num_soft affecting services in a SOFT state
# for sake of completeness, too.
[...]
Kind regards,
J. Bern
--=20
Jochen Bern, Systemingenieur --- LINworks GmbH
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP =3D D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C2=
7
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Gesch=E4ftsf=FChrer Metin Dogan, Oliver Mic=
hel
--------------050302000204040004040306
Content-Type: text/plain;
name="nagios-3.2.3-NotifNum-patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="nagios-3.2.3-NotifNum-patch.txt"
--- nagios-3.2.3+SmallPatches/sample-config/cgi.cfg.orig 2010-11-05 20:30:26.000000000 +0100
+++ nagios-3.2.3+SmallPatches/sample-config/cgi.cfg.in 2010-11-05 21:52:15.000000000 +0100
@@ -370,3 +370,31 @@
#tab_friendly_titles=1
+
+
+# SERVICE STATES TO ANNOTATE WITH CURRENT NOTIFICATION NO.
+# Set this to an OR of the service state identifiers for
+# which status.cgi should not only report "Attempts" (e.g.,
+# "3/3" for a HARD non-OK state with max_check_attempts=3)
+# but also the current notification number ("(#0)" if no
+# problem notification has been sent yet, etc.). This is
+# helpful to identify services which switched between
+# different non-OK states a lot, or services which have a
+# first_notification_delay set and are "not yet officially"
+# considered in trouble.
+# Relevant values from include/statusdata.h (look them up
+# *there* if you want to be *really* sure):
+# #define SERVICE_PENDING 1
+# #define SERVICE_OK 2
+# #define SERVICE_WARNING 4
+# #define SERVICE_UNKNOWN 8
+# #define SERVICE_CRITICAL 16
+# You'll likely want to use add_notif_num_hard=0 (default)
+# or add_notif_num_hard=28 (warn+crit+unknown). There's an
+# add_notif_num_soft affecting services in a SOFT state
+# for sake of completeness, too.
+
+#add_notif_num_hard=28
+#add_notif_num_soft=0
+
+
--- nagios-3.2.3+SmallPatches/cgi/cgiutils.orig 2010-11-05 20:16:50.000000000 +0100
+++ nagios-3.2.3+SmallPatches/cgi/cgiutils.c 2010-11-05 21:47:02.000000000 +0100
@@ -119,6 +119,8 @@
int color_transparency_index_b=255;
int tab_friendly_titles=FALSE;
+int add_notif_num_hard=0;
+int add_notif_num_soft=0;
extern hostgroup *hostgroup_list;
extern contactgroup *contactgroup_list;
@@ -436,6 +438,12 @@
else if(!strcmp(var,"tab_friendly_titles"))
tab_friendly_titles=(atoi(val)>0)?TRUE:FALSE;
+
+ else if(!strcmp(var,"add_notif_num_hard"))
+ add_notif_num_hard=atoi(val);
+
+ else if(!strcmp(var,"add_notif_num_soft"))
+ add_notif_num_soft=atoi(val);
}
/* free memory and close the file */
--- nagios-3.2.3+SmallPatches/cgi/status.orig 2010-11-05 20:26:48.000000000 +0100
+++ nagios-3.2.3+SmallPatches/cgi/status.c 2010-11-05 21:55:21.000000000 +0100
@@ -59,6 +59,8 @@
extern int enable_splunk_integration;
extern int tab_friendly_titles;
+extern int add_notif_num_hard;
+extern int add_notif_num_soft;
ex
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
--------------050302000204040004040306
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 11/05/2010 05:30 PM, Michael Friedrich wrote:
> Jochen Bern wrote:
>> I'll save myself an 0x3e8 words and provide a screenshot instead.
> 3. sounds interesting.
Last one for today / this week ...
# SERVICE STATES TO ANNOTATE WITH CURRENT NOTIFICATION NO.
# Set this to an OR of the service state identifiers for
# which status.cgi should not only report "Attempts" (e.g.,
# "3/3" for a HARD non-OK state with max_check_attempts=3D3)
# but also the current notification number ("(#0)" if no
# problem notification has been sent yet, etc.). This is
# helpful to identify services which switched between
# different non-OK states a lot, or services which have a
# first_notification_delay set and are "not yet officially"
# considered in trouble.
[...]
# You'll likely want to use add_notif_num_hard=3D0 (default)
# or add_notif_num_hard=3D28 (warn+crit+unknown). There's an
# add_notif_num_soft affecting services in a SOFT state
# for sake of completeness, too.
[...]
Kind regards,
J. Bern
--=20
Jochen Bern, Systemingenieur --- LINworks GmbH
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP =3D D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C2=
7
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Gesch=E4ftsf=FChrer Metin Dogan, Oliver Mic=
hel
--------------050302000204040004040306
Content-Type: text/plain;
name="nagios-3.2.3-NotifNum-patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="nagios-3.2.3-NotifNum-patch.txt"
--- nagios-3.2.3+SmallPatches/sample-config/cgi.cfg.orig 2010-11-05 20:30:26.000000000 +0100
+++ nagios-3.2.3+SmallPatches/sample-config/cgi.cfg.in 2010-11-05 21:52:15.000000000 +0100
@@ -370,3 +370,31 @@
#tab_friendly_titles=1
+
+
+# SERVICE STATES TO ANNOTATE WITH CURRENT NOTIFICATION NO.
+# Set this to an OR of the service state identifiers for
+# which status.cgi should not only report "Attempts" (e.g.,
+# "3/3" for a HARD non-OK state with max_check_attempts=3)
+# but also the current notification number ("(#0)" if no
+# problem notification has been sent yet, etc.). This is
+# helpful to identify services which switched between
+# different non-OK states a lot, or services which have a
+# first_notification_delay set and are "not yet officially"
+# considered in trouble.
+# Relevant values from include/statusdata.h (look them up
+# *there* if you want to be *really* sure):
+# #define SERVICE_PENDING 1
+# #define SERVICE_OK 2
+# #define SERVICE_WARNING 4
+# #define SERVICE_UNKNOWN 8
+# #define SERVICE_CRITICAL 16
+# You'll likely want to use add_notif_num_hard=0 (default)
+# or add_notif_num_hard=28 (warn+crit+unknown). There's an
+# add_notif_num_soft affecting services in a SOFT state
+# for sake of completeness, too.
+
+#add_notif_num_hard=28
+#add_notif_num_soft=0
+
+
--- nagios-3.2.3+SmallPatches/cgi/cgiutils.orig 2010-11-05 20:16:50.000000000 +0100
+++ nagios-3.2.3+SmallPatches/cgi/cgiutils.c 2010-11-05 21:47:02.000000000 +0100
@@ -119,6 +119,8 @@
int color_transparency_index_b=255;
int tab_friendly_titles=FALSE;
+int add_notif_num_hard=0;
+int add_notif_num_soft=0;
extern hostgroup *hostgroup_list;
extern contactgroup *contactgroup_list;
@@ -436,6 +438,12 @@
else if(!strcmp(var,"tab_friendly_titles"))
tab_friendly_titles=(atoi(val)>0)?TRUE:FALSE;
+
+ else if(!strcmp(var,"add_notif_num_hard"))
+ add_notif_num_hard=atoi(val);
+
+ else if(!strcmp(var,"add_notif_num_soft"))
+ add_notif_num_soft=atoi(val);
}
/* free memory and close the file */
--- nagios-3.2.3+SmallPatches/cgi/status.orig 2010-11-05 20:26:48.000000000 +0100
+++ nagios-3.2.3+SmallPatches/cgi/status.c 2010-11-05 21:55:21.000000000 +0100
@@ -59,6 +59,8 @@
extern int enable_splunk_integration;
extern int tab_friendly_titles;
+extern int add_notif_num_hard;
+extern int add_notif_num_soft;
ex
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]