Page 1 of 1

Re: [Nagios-devel] Question,

Posted: Wed Nov 10, 2010 3:30 pm
by Guest
This is a multi-part message in MIME format.
--------------030309010108080502020905
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.
>> I suppose that putting the control into cgi.cfg would be possible; the
>> bloat caused by having both variants in the executables should be low
>> enough ...
> 1. MultiUrl Patch has been applied to Icinga since 1.0.2 and so far it
> is working, not being optional. Some bug reports, all fixed for now.
> Seems that people are using it.

Took me a moment to change it from a compile-time to a runtime
configuration ...

# MULTIURL PATCH
# Activating the patch changes the parsing of notes_url and
# action_url for hosts and services. (Changing it for
# hostgroups and servicegroups as well would require a far
# more aggressive rewrite of the CGIs, I'm afraid.) Example:
# notes_url 'foo' 'bar' baz' class=3D'tips' rel=3D'or=
g
# will result in the following three (!) hyperlinks being
# displayed (edited for brevity):
#
#
#
# Note the use of the escape character "'" *within* the *last*
# URL (which has been inspired by PNP4Nagios' preview popups),
# and how the icon filename gets varied. If the config were:
# notes_url 'foo' 'bar' 'baz'
# instead, then the third URL would change to:
#
# Also note that it's up to you to provide the *-notes.gif
# and/or *-action.gif files.

That's all for now, as my fiddling with the check scheduling (randomize
check times so as to dissolve "run-together heaps" over time) is still
quite far from release quality.

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

--------------030309010108080502020905
Content-Type: text/plain;
name="nagios-3.2.3-MultiURL-patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="nagios-3.2.3-MultiURL-patch.txt"

diff -Naur nagios-3.2.3+SmallPatches/cgi/cgiutils.c nagios-3.2.3+SP+MU/cgi/cgiutils.c
--- nagios-3.2.3+SmallPatches/cgi/cgiutils.c 2010-11-05 21:47:02.000000000 +0100
+++ nagios-3.2.3+SP+MU/cgi/cgiutils.c 2010-11-10 16:02:13.000000000 +0100
@@ -28,6 +28,7 @@
#include "../include/objects.h"
#include "../include/statusdata.h"

+#define SKIP_MULTIURL_DEFS
#include "../include/cgiutils.h"

char main_config_file[MAX_FILENAME_LENGTH];
@@ -121,6 +122,7 @@
int tab_friendly_titles=FALSE;
int add_notif_num_hard=0;
int add_notif_num_soft=0;
+int use_multiurls=0;

extern hostgroup *hostgroup_list;
extern contactgroup *contactgroup_list;
@@ -444,6 +446,9 @@

else if(!strcmp(var,"add_notif_num_soft"))
add_notif_num_soft=atoi(val);
+
+ else if(!strcmp(var,"use_multiurls"))
+ use_multiurls=(atoi(val)>0)?TRUE:FALSE;
}

/* free memory and close the file */
diff -Naur nagios-3.2.3+SmallPatches/cgi/extinfo.c nagios-3.2.3+SP+MU/cgi/extinfo.c
--- nagios-3.2.3+SmallPatches/cgi/extinfo.c 2010-11-05 20:23:24.000000000 +0100
+++ nagios-3.2.3+SP+MU/cgi/extinfo.c 2010-11-10 15:55:18.000000000 +0100
@@ -439,25 +439,29 @@
if(display_type==DISPLAY_HOST_INFO && temp_host!=NULL){
printf("\n");
if(temp_host->action_url!=NULL && strcmp(temp_host->action_url,"")){
+ process_macros_r(mac, temp_host->action_url,&processed_string,0);
+ BEGIN_MULTIURL_LOOP
printf("\n");
printf("action_url,&processed_string,0);


...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]