Re: [Nagios-devel] nagios php interface version 0.01

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] nagios php interface version 0.01

Post by Guest »

So basically all of the "flattening" I did in php is not needed :^P :^)

Where can I get the details about the formats for 2.0 ???
Or is it non-existant currently? Should I just look at the CVS
Code to determine the formats?


-Mark


-----Original Message-----
From: nagios-devel-admin@lists.sourceforge.net
[mailto:nagios-devel-admin@lists.sourceforge.net] On Behalf Of Ethan
Galstad
Sent: Monday, April 14, 2003 9:22 PM
To: nagios-devel@lists.sourceforge.net
Subject: Re: [Nagios-devel] nagios php interface version 0.01

Since you've taken the leap on a big project, I'll throw in a few
comments. :-)

I would plan on developing this to work with 2.0, rather than 1.0.
The format of the status, comment, and downtime files have changed in
2.0.

Also, 2.0 has a cached object file (var/objects.cache by default)
that is created after Nagios starts. It contains a "flattened" view
of all object definitions that were present when Nagios started. All
definitions have already been resolved, replicated, and all the fancy
tricks are applied before this file gets created. This makes it very
easy for external apps (like the PHP interface) to parse the config
without having to worry about changes in how Nagios parses the raw
object definition files.

Lastly, I personally believe that many of the current CGIs are
horrendous, so I wouldn't be too worried about replicating their look
and feel exactly. I think moving to a PHP interface would be a good
time to evaluate some different interface designs before anything is
nailed in stone. This might include things like a tabbed interface,
hiding links that are not used very often, using drop-down menus for
command lists (as in the host/service detail view of extinfo.cgi),
etc. Food for thought anyway.

I will likely be able to give you a hand with much of the conversion,
but not until 2.0 goes beta. I need to finish up the major coding
and start writing documentation before I can move on to something
new.


On 13 Apr 2003 at 13:37, Mark Musone wrote:

> Ok,
>
> This is not by any means done. In fact I'm only releasing it so that
> Others can help. It is purely a developmental version right now!!
>
> This _should_ be a drop-in replacement for the cgi's. Just drop this
in
> a htdocs directory (Not cgi-bin) that has nagios and php. It _should_
> read
> The default nagios.cfg file in /usr/local/nagios/etc/nagios.cfg.
>
> If your nagios.cfg file is somewhere else, then change the value in
the
> file readconfig.php:
>
> $config_file = '/usr/local/nagios/etc/nagios.cfg';
>
> >From there, it _should_ bootstrap itself and load all the other
> configs...
>
> Note, it does NOT currently do ALL the parsing and object types,
> especially the "timesaving" tricks. It should do all the basic parsing
> of all the types. It also handles object templates (i.e. objects with
a
> "use" directive) and it handles wildcard services (ones with a "*").
It
> doesn't
> Do any of the other tricks yes (multiple hosts per object..etc..)
>
> Be forewarned, it's ugly..right now the status of that even work are:
>
>
> Tactical Overview: Converted to PHP, does not come up with the correct
> values though
>
> Service Detail: Should be working ok
> Host Detail: Should be working ok
> Status Overview: Should be working ok
> Status Summary: Should be working ok
> Status Grid: Should be working ok
> Status Map: Not converted to PHP yet.
> 3-D Status Map: Not converted to PHP yet.
>
> Service Problems: Not converted to PHP yet.
> Host Problems: Not converted to PHP yet.
> Network Outages: Not converted to PHP yet.
>
> Comments: Not converted to PHP yet.
> Downtime: Not converted to PHP yet.
>
> Process Info: Not converted to PHP yet.
> Performance Info: Not converted to PHP yet.
> Scheduling Queue: Not converted to PHP yet.
>
> Trends: Not converted to PHP yet.
> Availability: Not converted to PHP yet.
> Alert Histogram: Not converted to PHP yet.
> Alert History: Not converted to PHP yet.
> Alert Summary: Not converted to PHP yet.
> Notifications: Not converted to PHP yet.
> Event Log: Not converted to PHP yet.
>
>
> View Config:

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: agios-devel-admin@lists.sourceforge.ne
Locked