monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: monit status output


From: Jan-Henrik Haukeland
Subject: FYI: monit status output
Date: Mon, 16 Feb 2004 21:01:57 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Reasonable Discussion, linux)

As mentioned, I plan to hack the status output and add XML output. In
the process I suggest that the status is simplified quite a bit,
actually it *needs* to be simplified to a common denominator. This
means that only the following common attributes are considered when
status is printed for each service: 

    type {process, file, device, directory, host}, name, status {0,1}
    and monitor status {0,1}.

Where 0 means FALSE, i.e. either the service is down or an IF-test
failed for the service. 1 means that that the service is up and
everything is ok.

The XML output will look like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<monit>
        <monit-server>
                <uptime>String</uptime>   
        </monit-server>
        <service>
                <type>process</type>
                <name>apache</name>
                <status>1</status>
                <monitored>1</monitored>
        </service>
        <service>
                <type>host</type>
                <name>ftp.redhat.com</name>
                <status>0</status>
                <monitored>0</monitored>
        </service>
        <service>
                <type>file</type>
                <name>httpd.bin</name>
                <status>0</status>
                <monitored>1</monitored>
        </service>
        <service>
                <type>directory</type>
                <name>/etc</name>
                <status>0</status>
                <monitored>1</monitored>
        </service>
        <service>
                <type>device</type>
                <name>hda5</name>
                <status>1</status>
                <monitored>1</monitored>
        </service>
</monit>

and running "monit status" from the command line can produce this
simplified text output: (If a service is not monitored, the text "not
monitored" is printed *instead* of the status (which is unknown))

  The monit daemon uptime: 28d 12m

  Process 'apache':       running
  Process 'sybase':       not running
  File 'httpd.bin':       not monitored
  Host 'tildeslash.com':  available
  Host 'rhn.redhat.com':  not available or has errors
  Device hda5:            accessible
  Directory /etc:         not accessible or has errors


Finally the current URL: http://localhost:2812/name?action=status
which prints the text status for the service 'name' is replaced with
this url: http://localhost:2812/_status?output=<type> where <type> is
either xml or text (at the moment). The new URL prints the status for
all monitored services.

Unless there are comments or objections to this proposal, I'm going to
implement the changes outlined above.

-- 
Jan-Henrik Haukeland




reply via email to

[Prev in Thread] Current Thread [Next in Thread]