Parent/child host relationship

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Wed May 28 04:44:21 CEST 2003


Dear Sir,

I am writing with a very important patch for your _extremely_ valuable 
and helpful NagiosConfig module.

It seemed to me a good idea to have a CGI.pm front end to the Nag 
availability reports - the Nag interface is awkward in that I always 
want State Retention, Initial State, Backtrack=0 and that the start and 
end dates are a little tricky to complete (I would much rather have one 
front page to the report) - and the only snag to this is getting the 
service descriptions and hosts.

Your wonderful module not only does it beautifully but much better than 
I can do.

tsitc> diff -u NagiosConfig.pm.orig NagiosConfig.pm
--- NagiosConfig.pm.orig        Wed May 28 12:42:53 2003
+++ NagiosConfig.pm     Wed May 28 12:41:37 2003
@@ -1,4 +1,18 @@
+
+
+
 package NagiosConfig ;
+
+#
+# NagiosConfig by Patrick LeBoutillier 
(<patrick_leboutillier at hotmail.com>)
+# 
+
+# my $cfg = new NagiosConfig("/usr/local/nagios/etc/nagios.cfg") ;
+
+# foreach my $h|$s (@{$cfg->{objects}->{host|service}}){
+#     my @things = split(/\s*,\s*/,  $h->{parents}) | print 
$s->{service_description} | print $s->{other_config_keys} ;
+#     ...
+# }
 
 use strict ;
 


Thank you very much,

Yours sincerely.


-- 
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list