<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>LINICKX.com</title><link>https://www.linickx.com/</link><description></description><lastBuildDate>Mon, 19 Mar 2007 12:07:00 +0000</lastBuildDate><item><title>How to Monitor wordpress with Nagios</title><link>https://www.linickx.com/how-to-monitor-wordpress-with-nagios</link><description>&lt;p&gt;&lt;a href="http://wordpress.org"&gt;Wordpress&lt;/a&gt; like many web applications relies on
apache (&lt;em&gt;or something else&lt;/em&gt;) to serve the HTTP pages and mysql to store
the data. Your wordpress website is important to you, so you need an
external monitoring system to let you know what's going on.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.nagios.org"&gt;Nagios&lt;/a&gt; is a great, enterprise class,
open-source monitoring application; and what you need do is configure it
to exactly represent how wordpress works; if you can get that right you
can immediately get notified if any piece of the puzzle fails.&lt;/p&gt;
&lt;p&gt;I'm going to write up a simple example of how to monitor wordpress and
it's associated jigsaw pieces, so we're going to setup one host with
appropriate dependant services. Ultimately, you should configure nagios
to suit exactly how your environment works, but hopefully this "how to"
will get you started.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Basic Config.&lt;/strong&gt;&lt;br /&gt;
To configure nagios you need have services (&lt;em&gt;such as http&lt;/em&gt;) associated
with hosts; to get started, I'm going to have to assume you have
followed &lt;a href="http://www.maxsworld.org/index.php/how-tos/nagios"&gt;another "how
to"&lt;/a&gt; and have nagios
up and running, and monitoring localhost, you can even use &lt;a href="https://www.linickx.com/index.php?content=nagios"&gt;my own
config generator&lt;/a&gt; to
get you started ;) Basically you should have a generic check-host-alive
host.cfg entry like so:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;define host{
        use                     generic-host            ; Name of host template to use
        host_name               linickx.com
        alias                   My WebSite
        address                 www.linickx.com
        check_command           check-host-alive
        max_check_attempts      10
        check_period            24x7
        notification_interval   120
        notification_period     24x7
        notification_options    d,r
        contact_groups  admins
        }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The first (&lt;em&gt;and easiest&lt;/em&gt;) part of wordpress to monitor is the web-server
which serves the web pages on port 80, so a &lt;strong&gt;/etc/nagios/serivces.cfg&lt;/strong&gt;
entry like.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;define service{
    use                             generic-service         ; Name of service template to use
    host_name                       www.linickx.com
    service_description             HTTP
    is_volatile                     0
    check_period                    24x7
    max_check_attempts              10
    normal_check_interval           1
    retry_check_interval            1
    contact_groups                  admins
    notification_options            w,u,c,r
    notification_interval           960
    notification_period             24x7
    check_command                   check_http
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Getting Technical.&lt;/strong&gt;&lt;br /&gt;
Have you noticed the deliberate mistake ? I'm using resolvable names in
my config files, this is deliberate as my website is on a shared server,
and check_http with an IP address is very different to check_http
www.linickx.com , but in order for www.linickx.com to work, DNS needs to
be working. While we are here, it makes sense to monitor that as well.
In &lt;strong&gt;/etc/nagios/checkcommands.cfg&lt;/strong&gt; add an entry similar to....&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# 'check_dns' command definition
define command{
        command_name    check_dns_linickx-com
        command_line    $USER1$/check_dns -H www.linickx.com -a 69.73.189.228
        }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Where the -a ip address , is the ip of your "A Record", if you don't
know what that is you can use
&lt;a href="http://www.dnsstuff.com/tools/lookup.ch?name=www.google.com&amp;amp;type=A"&gt;dnsstuff.com&lt;/a&gt;
to find it for you. You can now create a service that uses that
command...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;define service{
        use                             generic-service         ; Name of service template to use
        host_name                       linickx.com
        service_description             DNS
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              10
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  admins
        notification_options            w,u,c,r
        notification_interval           960
        notification_period             24x7
        check_command                   check_dns_linickx-com
        }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We have HTTP and DNS monitored, all the wordpress data is stored in a
mySQL database, so now you need to monitor that, to do that you need to
setup another checkcommand; add the following.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# mySQL command definition
define command{
    command_name    check_mysql
    command_line    $USER1$/check_mysql -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This check command will log into the database and report OK if it is
working, much better than check_tcp 3306 . Now you can add the
following service entry&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;define service{
    use                             generic-service         ; Name of service template to use
    host_name                       www.linickx.com
    service_description             mySQL
    is_volatile                     0
    check_period                    24x7
    max_check_attempts              10
    normal_check_interval           5
    retry_check_interval            1
    contact_groups                  admins
    notification_options            w,u,c,r
    notification_interval           960
    notification_period             24x7
    check_command                   check_mysql!USERNAME!PASSWORD
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For this to work the user will need to have permissions to log into the
nagios machine, so if you followed &lt;a href="http://codex.wordpress.org/Installing_WordPress#Using_the_MySQL_Client"&gt;the wordpress
codex&lt;/a&gt;
and added "TO wordpressusername@localhost" in your mysql statement,
you'll need to add that to run&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;GRANT ALL PRIVILEGES ON databasename.* TO wordpressusername@NAGIOS-SERVER;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where NAGIOS-SERVER is a resolvable name or ip address. Note: Don't
forget about firewalls ! Make sure that TCP 3306 is open between your
nagios box &amp;amp; wordpress website.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The bit that actually monitors wordpress.&lt;/strong&gt;&lt;br /&gt;
You are now independently checking both HTTPD &amp;amp; MYSQL, but what if
wordpress can't actually connect (lets say wp-config.php is screwed),
both these checks will pass and nagios will stay green; what you need to
do is monitor a page. If that page works , everything's fine, if the
page fails (&lt;em&gt;and you get the default database connection error page&lt;/em&gt;)
then nagios flags and alert. We're going to add another checkcommand&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# 'check linickx.com wordpress' command definition
define command{
        command_name    check_wp_linickx
        command_line    $USER1$/check_http -H $HOSTADDRESS$ -u /blog/about-me -s "About Me"
        }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can alter this in anyway you want, but what it does is it looks for
http://\$HOSTADDRESS\$/blog/about-me (&lt;em&gt;so
https://www.linickx.com/blog/about-me&lt;/em&gt;) and if that page returns "About
Me" then everything is OK.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tidying up with dependencies.&lt;/strong&gt;&lt;br /&gt;
We've already established that if either mySQL, http or DNS fails,
wordpress will fail, so we want to ensure we don't get hit with double
alerts about the same problem, enter dependencies. HTTP is dependant on
DNS, enter the following in &lt;strong&gt;/etc/nagios/dependencies.cfg&lt;/strong&gt; (&lt;em&gt;make sure
you have cfg_file=/etc/nagios/dependencies.cfg in
/etc/nagios/nagios.cfg&lt;/em&gt; )&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;define servicedependency{
        host_name                       linickx.com
        service_description             DNS
        dependent_host_name             linickx.com
        dependent_service_description   HTTP
        execution_failure_criteria      n
        notification_failure_criteria   u,c
        inherits_parent         1
        }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and WordPress is dependant on HTTP &amp;amp; mySQL , so you need...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;define servicedependency{
        host_name                       linickx.com
        service_description             HTTP
        dependent_host_name             linickx.com
        dependent_service_description   WordPress
        execution_failure_criteria      n
        notification_failure_criteria   u,c
        inherits_parent         1
        }

define servicedependency{
        host_name                       linickx.com
        service_description             mySQL
        dependent_host_name             linickx.com
        dependent_service_description   WordPress
        execution_failure_criteria      n
        notification_failure_criteria   u,c
        inherits_parent         1
        }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can check your config with &lt;strong&gt;nagios -v /etc/nagios/nagios.cfg&lt;/strong&gt; ,
assuming you have no errors wait for checks to go green and begin
testing. Tests you can run can be anything from unplugging the cable
from your nagios box to simulate a complete failure, to stopping the
mysql service on your website to make sure check_mysql works.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Making it pretty for the hell of it.&lt;/strong&gt;&lt;br /&gt;
Nagios has a web interface, one of the things we can do is customize it
to represent our config, how about a pretty icon for our website ? or a
custom wordpress action ? Here's how to setup a pretty icon and action
(&lt;em&gt;button to click on&lt;/em&gt;) for our wordpress service.&lt;/p&gt;
&lt;p&gt;To get started, you'll probably need a copy of the &lt;a href="http://svn.automattic.com/wordpress/trunk/wp-admin/images/wordpress-logo.png"&gt;wordpress logo from
the
svn&lt;/a&gt;
, I then cut the "W" out to make a square icon, but you can do what you
like :) Firstly something non essential: To display any icon in nagios
as a "host icon" you're going to need it in both png and gd2 image
format, you'll have to install a conversion tool. (&lt;em&gt;for redhat&lt;/em&gt;)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;yum install gd-progs
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to run the conversion, use the following...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pngtogd2 wordpress-logo.png wordpress-logo.gd2 0 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;that'll give you a chunk size of 0 and no compression &lt;a href="http://www.nagios.org/faqs/viewfaq.php?faq_id=97"&gt;as recommended
for nagios&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But if you just want service icons, then you can get away with just a
png. Save any custom images in &lt;strong&gt;/usr/share/nagios/images/logos/&lt;/strong&gt; make
sure they're readable ( &lt;em&gt;e.g. chmod 644 file&lt;/em&gt; ) and we're good to go.&lt;/p&gt;
&lt;p&gt;So the config file, 1st make sure you have
&lt;strong&gt;cfg_file=/etc/nagios/serviceextinfo.cfg&lt;/strong&gt; enabled in
&lt;strong&gt;/etc/nagios/nagios.cfg&lt;/strong&gt; . My sericeextinfo.cfg has the following...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;define serviceextinfo{
    host_name               linickx.com
    service_description     WordPress
    notes                   My website  powered by wordpress !
    icon_image              wordpress-w.png
    icon_image_alt          Wordpress
    action_url              http://$HOSTADDRESS$/blog/wp-admin/
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What this does is it adds my wordpress-w icon to the nagios status
pages, and give me a "red star" type icon which when I click on takes me
to my wordpress admin page... cool !&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Some compulsory Screen-shots.&lt;/strong&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;a href="https://www.linickx.com/files/2008/05/nagios-linickxdotcom-host-detail.png"&gt;&lt;img alt="Nagios Host Detail Example" src="https://www.linickx.com/files/2008/05/nagios-linickxdotcom-host-detail-150x150.png" title="nagios linickx.com host detail" /&gt;&lt;/a&gt;   &lt;a href="https://www.linickx.com/files/2008/05/nagios-linickxdotcom-service-wordpress-detail.png"&gt;&lt;img alt="Nagios Service detail for WordPress" src="https://www.linickx.com/files/2008/05/nagios-linickxdotcom-service-wordpress-detail-150x150.png" title="nagios linickx.com service wordpress detail" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;That should just about wrap it up, one fully monitored wordpress
installation; as you can see this can be adapted to monitor any php /
mysql app :) Please &lt;a href="https://www.linickx.com/index.php?content=contact"&gt;let me
know&lt;/a&gt; if you have any
further suggestions.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Mon, 19 Mar 2007 12:07:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2007-03-19:how-to-monitor-wordpress-with-nagios</guid><category>how to</category><category>Linux</category><category>nagios</category><category>WordPress</category></item><item><title>Cacti &amp; Nagios - Missing Favicons</title><link>https://www.linickx.com/cacti-nagios-missing-favicons</link><description>&lt;p&gt;Recently I decided to re-organise my bookmarks toolbar, and added links
to my &lt;a href="http://www.nagios.org"&gt;nagios&lt;/a&gt; and &lt;a href="http://www.cacti.net"&gt;cacti&lt;/a&gt;
installations. I noticed that the favicons where missing.&lt;/p&gt;
&lt;p&gt;For cacti,&lt;a href="http://forums.cacti.net/about18364.html"&gt;there's a how to&lt;/a&gt;,
but I found it a little over kill - I didn't need step 2 , as my catci
install is an &lt;a href="http://dag.wieers.com/packages/cacti/"&gt;rpm from dag&lt;/a&gt;, and
I didn't bother with step 4, as it worked without it, but hey
&lt;abbr title="Your Mileage May Vary"&gt;ymmv&lt;/abbr&gt;!&lt;/p&gt;
&lt;p&gt;Nagios was simpler, depending on how you installed nagios, will effect
file permission , owners, directories etc. Again, I've got &lt;a href="http://dag.wieers.com/packages/nagios/"&gt;another dag
rpm&lt;/a&gt;, so for me I logged in as
root,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd /usr/share/nagios/
wget http://www.nagios.org/images/favicon.ico
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;then edit index.html. just before \&amp;lt;/head&amp;gt; , insert&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;link rel="shortcut icon" href="/nagios/favicon.ico" type="image/x-icon" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;refresh your browser (delete the cache if necessary), and job done ! :D&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Fri, 26 Jan 2007 10:37:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2007-01-26:cacti-nagios-missing-favicons</guid><category>Enterprise Linux</category><category>favicon.ico</category><category>how to</category><category>nagios</category></item><item><title>Nagios Checker - Firefox Extension</title><link>https://www.linickx.com/nagios-checker-firefox-extension</link><description>&lt;p&gt;Been looking for something like this for a while.....&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://addons.mozilla.org/firefox/3607/"&gt;Nagios Checker | Firefox Add-ons | Mozilla
Corporation&lt;/a&gt;&lt;br /&gt;
 The statusbar indicator of the events from the network monitoring
system Nagios. Information is parsed from Nagios web interface. In the
extension settings dialog simply fill the start page URL of your
Nagios web interface, eg. http://www.yourfirm.com/nagios/ and let the
button to locate status script url.&lt;/p&gt;
&lt;/blockquote&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Mon, 11 Dec 2006 11:11:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2006-12-11:nagios-checker-firefox-extension</guid><category>extension</category><category>Firefox</category><category>nagios</category></item><item><title>Nagios Ping Tool - Another Hack</title><link>https://www.linickx.com/nagios-ping-tool-another-hack</link><description>&lt;p&gt;I've received a patch from &lt;a href="http://www.utexas.edu"&gt;ed.davison&lt;/a&gt;, if you
have commented out hosts in your config, you'll get odd \"address -
hostname\" results in the drop down list. Ed's patch fixes that; thankx
:-D&lt;/p&gt;
&lt;p&gt;At the moment you'd have to apply the patch your self from the below;
but I have a &lt;em&gt;official&lt;/em&gt; revision in the pipeline.&lt;/p&gt;
&lt;div class="code"&gt;

    -- readhosts.php       2005/11/09 18:07:43     1.1
    +++ readhosts.php       2005/11/09 18:08:12
    @@ -23,16 +23,20 @@

           $current = trim($line);

    -       if (preg_match (\"/addres/\", \"$current\")) {
    -               $keywords = preg_split (\"/[\\s,]+/\", \"$current\");
    -               $ipaddress[$counter] = $keywords[1];
    -               $counter++;
    -       }
    -
    -       if (preg_match (\"/host_name/\", \"$current\")) {
    -               $keywords = preg_split (\"/[\\s,]+/\", \"$current\");
    -               $node_name[$counter2] = $keywords[1];
    -               $counter2++;
    +       if (!preg_match (\"/^#/\", \"$current\")) {
    +
    +               if (preg_match (\"/addres/\", \"$current\")) {
    +                       $keywords = preg_split (\"/[\\s,]+/\", \"$current\");
    +                       $ipaddress[$counter] = $keywords[1];
    +                       $counter++;
    +               }
    +
    +               if (preg_match (\"/host_name/\", \"$current\")) {
    +                       $keywords = preg_split (\"/[\\s,]+/\", \"$current\");
    +                       $node_name[$counter2] = $keywords[1];
    +                       $counter2++;
    +               }
    +
           }

&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Wed, 09 Nov 2005 20:53:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2005-11-09:nagios-ping-tool-another-hack</guid><category>nagios</category><category>Nagios Ping and Traceroute Tool</category><category>PHP</category></item><item><title>Nagios Ping Tool &amp; Nagios QL</title><link>https://www.linickx.com/nagios-ping-tool-nagios-ql</link><description>&lt;p&gt;Recently I had a request from &lt;a href="http://www.2020media.com"&gt;rex&lt;/a&gt; to modify
my &lt;a href="https://www.linickx.com/index.php?content=php#nagios-ping-tool.tgz"&gt;nagios ping
tool&lt;/a&gt;
(&lt;a href="http://www.nagiosexchange.org/Utilities.16.0.html?&amp;amp;tx_netnagext_pi1[p_view]=349"&gt;Official Nagios Exchange
page&lt;/a&gt;);
he wanted to use the tool with his nagios configuration.&lt;/p&gt;
&lt;p&gt;Rex appeared to be using Nagios QL (&lt;em&gt;Which I believe to be a nagios
management tool&lt;/em&gt;) , now &lt;em&gt;QL&lt;/em&gt; handles nagios config slightly differently
. The &lt;em&gt;Ping Tool&lt;/em&gt; reads the nagios hosts.cfg file, and turns it into a
couple of arrays to use for ping &amp;amp; display, with &lt;em&gt;QL&lt;/em&gt; they generate
multiple hosts.cfg files, one for each hosts.&lt;/p&gt;
&lt;p&gt;Perhaps a short way of saying it, Rex needed to read in multiple
hosts.cfg files from a directory, and below is the hack to do it :)&lt;/p&gt;
&lt;p&gt;Simply copy &amp;amp; past the below code into a file called readhosts.php,
replace your readhosts.php with the new one , and set the variable
\$hostfilepath in config.php, something like \$hostfilepath = "/hosts";
(&lt;em&gt;assuming /hosts is where you keep the files ;-)&lt;/em&gt; ) should do the job.&lt;/p&gt;
&lt;div class="code"&gt;

    &lt;?php

    #This page reads in the hosts described in the config file to an array ready for use later

    if ($hostfilepath == "" ) {
            ?&gt;
        &lt;h1&gt; Please update your config file&lt;/h1&gt;
        &lt;h2&gt; You need to add the line $hostfilepath = "/path/to/host/config/files"; to config.php &lt;/h2&gt; 
        &lt;?php
            exit;
    }


        #We need a counter to increment for the file array.
        $counter = 0;
        # A second counter is used for the array of actual hosts
        $counter2 = 0;


    if (is_dir($hostfilepath)) {

        if ($dh = opendir($hostfilepath)) {

            while (($file = readdir($dh)) !== false) {

                $firstchar = substr($file,0,1);
                if ( $firstchar !== "." ) {
                    $full_file_path = "$hostfilepath/$file";

                    $lines = file($full_file_path);

                    make_host_array();

                    #echo "$full_file_path&lt;br&gt;";
                }
            }
           closedir($dh);
        }
    }

    function make_host_array() {
        global $lines,$ipaddress,$node_name,$counter,$counter2;

        foreach ($lines as $line_num =&gt; $line) {

            $current = trim($line);

            if (preg_match ("/addres/", "$current")) {
                    $keywords = preg_split ("/[\s,]+/", "$current");
                $ipaddress[$counter] = $keywords[1];
                $counter++;
            } 

            if (preg_match ("/host_name/", "$current")) {
                    $keywords = preg_split ("/[\s,]+/", "$current");
                $node_name[$counter2] = $keywords[1];
                $counter2++;
            }


        }

    #print_r($ipaddress);
    #print_r($node_name);

    }

    ?&gt;

&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Tue, 08 Nov 2005 09:30:00 +0000</pubDate><guid isPermaLink="false">tag:www.linickx.com,2005-11-08:nagios-ping-tool-nagios-ql</guid><category>Blog</category><category>nagios</category><category>Nagios Ping and Traceroute Tool</category><category>PHP</category></item><item><title>PHP - Nagios Ping &amp; Traceroute Tool</title><link>https://www.linickx.com/php-nagios-ping-traceroute-tool</link><description>&lt;p&gt;Another day, another mini project.&lt;/p&gt;
&lt;p&gt;My place of work pretty much demanded the need for our monitoring guys
(i.e. people that stare at the nagios screen, waiting for red things) to
have the ability to run traceroutes from nagios to the effected node -
The twist in the story was that they wanted to do it from a browser !&lt;/p&gt;
&lt;p&gt;So, I thought, that'd be an easy php script then :cool: , well to be
honest it took a little longer than expected, mainly because I don't
really understand regular expressions (&lt;em&gt;yet&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.linickx.com/index.php?content=php#nagios-ping-tool.tgz"&gt;Nagios-ping-tool&lt;/a&gt;
Is a package of small scripts :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;config.php - some simple config variables, important for telling the
    script where to find your nagios hosts.cfg&lt;/li&gt;
&lt;li&gt;index.php - the script that creates the buttons&lt;/li&gt;
&lt;li&gt;readhosts.php - the script that reads /etc/nagios/hosts.cfg to find
    names &amp;amp; ip addresses&lt;/li&gt;
&lt;li&gt;header.php &amp;amp; footer.php - my actual implementation went into another
    &lt;em&gt;skinned&lt;/em&gt; site, so I put these in to format the pages properly&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://www.linickx.com/files/php/nagios-ping-tool.tgz"&gt;nagios-ping-tool.tgz can be downloaded from this
site&lt;/a&gt; or the
&lt;a href="http://www.nagiosexchange.org/Utilities.16.0.html?&amp;amp;tx_netnagext_pi1[p_view]=349"&gt;Nagios Exchange Project
Page&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Wed, 28 Sep 2005 15:48:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2005-09-28:php-nagios-ping-traceroute-tool</guid><category>Announcements</category><category>nagios</category><category>Nagios Ping and Traceroute Tool</category><category>PHP</category></item><item><title>PHP - Nagios Simple CFG Gen.</title><link>https://www.linickx.com/php-nagios-simple-cfg-gen</link><description>&lt;p&gt;&lt;a href="http://www.nagios.org"&gt;&lt;img alt="Nagios" src="http://www.nagios.org/images/smalllogo7.gif" /&gt;&lt;/a&gt;&lt;br /&gt;
.. or &lt;a href="http://www.nagios.org"&gt;nagios&lt;/a&gt; ;) is great, I use it a lot.&lt;/p&gt;
&lt;p&gt;In my continuing quest to cure command line phobia I've written a small
(&amp;amp; Basic) php script that can generate some sample configs. Simply type
in the IP of what you want to monitor , tick a couple of boxes, and copy
&amp;amp; paste what you get into the end of your config files - nice :cool:&lt;/p&gt;
&lt;p&gt;There's a Demo Site here :
&lt;a href="https://www.linickx.com/index.php?content=nagios"&gt;https://www.linickx.com/index.php?content=nagios&lt;/a&gt;&lt;br /&gt;
and the Source here:
&lt;a href="https://www.linickx.com/files/php/nagios-simple-gen_php.txt"&gt;https://www.linickx.com/files/php/nagios-simple-gen_php.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;br /&gt;
Also available at &lt;a href="http://www.nagiosexchange.org"&gt;nagiosexchange.org&lt;/a&gt;:
&lt;a href="http://www.nagiosexchange.org/Configuration.20.0.html?&amp;amp;tx_netnagext_pi1[p_view]=327"&gt;http://www.nagiosexchange.org/Configuration.20.0.html?&amp;amp;tx_netnagext_pi1[p_view]=327&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nick</dc:creator><pubDate>Tue, 16 Aug 2005 16:51:00 +0100</pubDate><guid isPermaLink="false">tag:www.linickx.com,2005-08-16:php-nagios-simple-cfg-gen</guid><category>nagios</category><category>PHP</category></item></channel></rss>