Organize by group?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Organize by group?

David Reagan
Is there a way to organize the web interface by group? Or something else
that obtains the same effect.

If I have host1 with domain1 and domain2 living in apache vhosts on it,
I'd like to group all of them together. But, as far as I can tell, I
have to set up a separate "check host" per domain.

For example:

     check host ws-prod-filehost-01_ping with address
ws-prod-filehost-01.lanecc.edu
       if failed icmp type echo count 5 with timeout 30 seconds for 3
times within 5 cycles then alert
     not every "* 1-2 * * *"
     check host filehost_http with address filehost.lanecc.edu
       if failed
         port 80
         protocol http
         status = 301
         with timeout 30 seconds for 3 times within 5 cycles
       then alert
     not every "* 1-2 * * *"
     check host filehost_https with address filehost.lanecc.edu
       if failed
         port 443
         protocol https
         with content = "ownCloud"
         and timeout 30 seconds for 3 times within 5 cycles
       then alert
     not every "* 1-2 * * *"
     check host media_http with address media.lanecc.edu
       if failed
         port 80
         protocol http
         with request /users/reagand/
         with content = "media server"
         and timeout 30 seconds for 3 times within 5 cycles
       then alert
     not every "* 1-2 * * *"
     check host media_https with address media.lanecc.edu
       if failed
         port 443
         protocol https
         with request /users/reagand/
         with content = "media server"
         and timeout 30 seconds for 3 times within 5 cycles
       then alert
     not every "* 1-2 * * *"

results in 5 lines on the monit webui.

(I do know that filehost_http and filehost_https could be combined, as
could media_http and media_https. I have them separate so that it's
easier for others to tell me if something is down.)

I'd rather have one line, something like:

FILEHOST
[ws-prod-filehost-01(icmp)][filehost(http|https]][media(http|https)]

Or:

FILEHOST   [5 probes, 2 failed, 1 unmonitored, 2 succeeded]

When you click on FILEHOST, it would take you to a page with a summary
at the top, and then the details of each probe just like you have when
you click on a host now.

Or something like that.

Any suggestions?


--

David Reagan
Web Systems Administrator
Information Technology
Lane Community College
Office Phone:  541-463-3376
Email:  [hidden email]


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: Organize by group?

Petra Humann-2
Hello,

> Am 30.01.2017 um 21:14 schrieb David Reagan <[hidden email]>:
>
> Is there a way to organize the web interface by group? Or something else that obtains the same effect.

I have a php webpage like that:

<html>
<head>head lines from the original monit service manager webpage</head
<body>

<?php

// lines for monit host1
$lines=file_get_contents("https://my_apache_host/host1/");
preg_match('/<center>.*<\/center>/',$lines,$treffer);
print str_replace("href='",“href='/host1/",$treffer[0]);   // adjust to match the URLs and print out
echo "\n“;

// lines for monit host2
….

?>
<div footer line from the original monit service manager webpage</div>
</body>
</html>

The monit webpage for host1 is configured in apache2 as a proxy:

ProxyPass /host1/ http://host1:2812/
ProxyPassReverse /host1/ http://host1:2812/
<Location /host1/>
          Require ip ...
          AuthName "Monitor"
          AuthType Basic
          AuthBasicProvider file
          AuthUserFile "..."  
          require valid-user
</Location>

Kind regards.
Petra Humann


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: Organize by group?

David Reagan
In reply to this post by David Reagan
Hey Petra,

If I'm reading the code correctly, you are grabbing each individual
host's monit information and displaying it via a centralized apache
site. So you are looking at each hosts local monit probes. I can see how
that would be useful for restricting access to Monit on your other
hosts, but it isn't quite what I would like.

In my case I have a single Monit instance that is probing multiple
remote hosts for information. I'd like to group individual probes
together on the main summary page.

Anyway, thanks for the information. It does give me food for thought on
how I could make what I want happen.

- David

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general