[Nagmin-users] adding extra tables to NagMIN

Fred Reimers fredreimers at comcast.net
Mon Oct 27 20:54:51 CET 2003


Skip,

If you add a field to a NagMIN table, NagMIN will automatically write
any additional fields from the table to the configuration file.  I did
this on purpose in case anyone wanted to add a real Nagios field to a
table where I've left it out.  That's why the logic seems backwards.
However, new tables won't create anything useful, so the patch you've
submitted makes a lot of sense.

The other routine where extra tables get special treatment is in
"view_tables.cgi".  There's a section where NagMIN decides where to
display the tables.  I split it out between Nagios DB and NagMIN DB
tables.  Extra tables won't be displayed unless they're added to one of
the lists.

What does "keyed by the ." mean??

Another option for your engineer info would be add phone number fields
to the contact information table and then ask NagMIN to ignore those
fields in nagios_write.  I was thinking of doing this anyway, but there
are so many applications with contact information that's never used, I'd
didn't want to create yet another place to store name/address/phone
number.  (I'm waiting to be asked for my zip code or phone number when
buying a 1/4 Pounder pretty soon.)

Let me know if adding phone information to the Contact table would be
helpful to you and I'll include the fields.


Fred

-----Original Message-----
From: nagmin-users-admin at lists.sourceforge.net
[mailto:nagmin-users-admin at lists.sourceforge.net] On Behalf Of Skip
Montanaro
Sent: Wednesday, October 08, 2003 5:49 PM
To: nagios-users at lists.sourceforge.net;
nagmin-users at lists.sourceforge.net
Subject: [Nagmin-users] adding extra tables to NagMIN



I have auxiliary info about our system engineers (home, work, cell
phones) which I want to store in a separate NagMIN table keyed by the .
I figured NagMIN would just ignore my system_engineers table, but I was
mistaken:

    Activate Nagios Configuration

    SQL select * from `system_engineers` order by system_engineers_name
    failed : 

Looking at the source for nagios_write.cgi I saw:

    for ($i=0;$i<@titles;$i++) {
            my $ok=1;
            if ($titles[$i] eq "PortScan") { $ok=0; }
            if ($titles[$i] eq "ServiceGroup") { $ok=0; }
            if ($titles[$i] eq "System") { $ok=0; }
            if ($ok) { push(@nagios_tables,$titles[$i]); }
    }

which seemed backwards to me.  Instead of excluding certain tables I
think it should explicitly mention the tables it's interested in.  I
submitted a patch to the NagMIN project:

 
http://sourceforge.net/tracker/index.php?func=detail&aid=820273&group_id
=77010&atid=548908

which solves the problem I encountered.  Is anyone aware of other places
where NagMIN excludes tables instead of specifically including the ones
it needs?

Thx,

-- 
Skip Montanaro
Got gigs? http://www.musi-cal.com/
          http://www.mojam.com/
Got spam? http://spambayes.sf.net/


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects. See the people
who have HELPED US provide better services: Click here:
http://sourceforge.net/supporters.php
_______________________________________________
Nagmin-users mailing list
Nagmin-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagmin-users



-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
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