monit-general
[Top][All Lists]
Advanced

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

Re: monitor network-interface lo


From: Russell Simpkins
Subject: Re: monitor network-interface lo
Date: Sat, 6 Dec 2014 09:49:19 -0500

You could also consider a very simple bash script

#!/bin/bash
status=$(ifconfig |grep -c "lo0:")
exit $status

Then run that with the check program with path:

check program myscript with path /usr/local/bin/myscript.sh 
       if status != 0 then alert


On Sat, Dec 6, 2014 at 9:44 AM, Rui Lapa <address@hidden> wrote:

Never noticed it didn't work for loopback interface.
Will dormant or carrier on the same path help?

It's the only way I know how, without using ip or ifconfig commands.

You can always develop a status check:

https://mmonit.com/monit/documentation/monit.html#PROGRAM-STATUS-TESTING

Just trying to help!

Em 06/12/2014 13:20, "Hermann" <address@hidden> escreveu:

Hi,

could you be a little more verbose?

I do

        # cat /sys/class/net/lo/operstate

and get the output

        unknown

Ifconfig shows that lo is up.

The OS is Debian Wheezy, if that matters.

Hermann


Am 06.12.2014 um 14:12 schrieb Rui Lapa:
> Hello,
>     Check /sys/class/net/lo/operstate for up via monit exec.
>
> My 1 cent,
>     Rui Lapa
>
> Em 06/12/2014 12:14, "Hermann" <address@hidden
> <mailto:address@hidden>> escreveu:
>
>     Hello,
>
>     I would like to monitor wether the "lo" network-interface is up and if
>     not, bring it up.
>
>     How can this be done with monit?
>
>     Thank you in advance
>
>     Hermann
>
>
>     --
>     To unsubscribe:
>     https://lists.nongnu.org/mailman/listinfo/monit-general
>
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
>


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

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


reply via email to

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