> Hello all,
>
> For some services my action_url is set to view performance
> data (graphs), while for other services the action_url is set to lead to
> an external webbased system to perform additional commands.
>
> To be able to see what action is to be performed in the Service Detail
> overview , I would like to be able to define different images for
> different actions.
>
> Some time ago (almost a year) I posted a request for this, but since
> then nothing happened.
>
> So, I decided to roll up my sleeves, and make the modifications myself.
>
Sweet. That's usually the best way to make something happen
> The attached patch adds the field 'action_image' to be defined for
> hosts, hostgroups, services, and service groups:
>
> define service {
> use template
> host_name host1
> service_description Load
> action_url http://....
> action_image action1.gif
> }
>
> If the action_image is not defined, the default red "splat" icon is used.
>
Nifty feature. I like it.
> Attached patch is made against 3.0.5, and is already running on my
> production Nagios server.
>
> I would be very happy if this patch can be included in the next Nagios
> release.
>
I'll queue it when I get a chance, and will extend it to also grok
notes_image (for notes_url) for consistency. However, altering the
sizes of the internal structures modifies the ABI for all NEB-modules,
so it's not something that can be done without bumping the minor-number
for a Nagios release. That means that this patch would force the next
Nagios-version to be called 3.1.0 (instead of 3.0.6), and I'm not sure
this functionality alone would be enough to warrant such a step.
Anyways, comments below:
--8/cgi-bin/nagios/).
-
+
+action_image:
+
+This optional directive is used to define the name of a GIF, PNG, or JPG image that can be used instead of the red "splat" icon for the action_url. If you plan on using relative paths, the base path will be your HTML images directory (i.e. /usr/local/nagios/share/images).
+
+
--8 closing tag completely. Deliberate
or erroneously?
--8<--8<--8<--
diff -ru nagios-3.0.5.org/include/objects.h nagios-3.0.5/include/objects.h
--- nagios-3.0.5.org/include/objects.h Mon Mar 31 21:09:36 2008
+++ nagios-3.0.5/include/objects.h Fri Nov 28 12:59:51 2008
@@ -452,7 +458,9 @@
char *failure_prediction_options;
char *notes;
char *notes_url;
+ char *notes_img;
char *action_url;
+ char *action_image;
char *icon_image;
char *icon_image_alt;
customvariablesmember *custom_variables;
diff -ru nagios-3.0.5.org/xdata/xodtemplate.h nagios-3.0.5/xdata/xodtemplate.h
--- nagios-3.0.5.org/xdata/xodtemplate.h Thu Feb 28 20:27:55 2008
+++ nagios-3.0.5/xdata/xodtemplate.h Fri Nov 28 12:59:51 2008
@ -269,7 +269,9 @@
char *failure_prediction_options;
char *notes;
char *notes_url;
+ char *notes_img;
char *action_url;
+ char *action_image;
char *icon_image;
char *icon_image_alt;
char *vrml_image;
@@ -295,7 +297,9 @@
int have_failure_prediction_options;
int have_notes;
int have_notes_url;
+ int have_notes_img;
int have_action_url;
+ int have_action_image;
int have_icon_image;
int have_icon_image_alt;
int have_vrml_image;
@@ -346,13 +350,17 @@
char *hostgroup_members;
char *notes;
char *notes_url;
+ char *notes_img;
char *action_url;
+ char *action_image;
int have
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]