|
From: | Martin van Diemen |
Subject: | Re: |
Date: | Thu, 19 Mar 2015 08:52:54 +0100 |
Hi,fixed the problem in the development version, will be part of next Monit release (5.12.2). It will be possible to use both network check types:check network virtnetw with address 1.2.3.4 # where 1.2.3.4 is IP aliasor:check network virtnetw with interface "eth0:0"Best regards,MartinOn 18 Mar 2015, at 14:18, Martin van Diemen <address@hidden> wrote:Hi Martin,Sorry but using the ip address results in the same error message:[CET Mar 18 14:16:26] error : 'virtnetw' link data gathering failed -- Cannot read /sys/class/net/eth0:0/operstate -- No such file or directoryBased on:check network virtnetw with address 1.2.3.4--Groeten,
MartinOn Wed, Mar 18, 2015 at 1:59 PM, Martin van Diemen <address@hidden> wrote:Thank you for making this clear. The HWaddr is the same on both ethernet adapters so I used the IP address instead.Thanks again!MartinOn Wed, Mar 18, 2015 at 1:54 PM, Martin Pala <address@hidden> wrote:The virtual interface (IP alias) doesn't have it's own network statistics ... it's part of the parent interface (eth0), we currently don't support using interface names like "eth0:0".
You can set the IP address-based monitoring for IP alias, but it'll read the statistics of the parent interface too - for example:
--8<--
eth1:0 Link encap:Ethernet HWaddr 00:22:33:44:55:66
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
--8<--
can be monitored by:
--8<--
check network myipalias with address 192.168.1.100 # note: will find interface for 192.168.1.100, which is eth1 in this case
--8<--
or:
--8<--
check network mynet with interface eth1 # note: statistics include the interface itself and all its IP aliases
--8<--
Best regards,
Martin
> On 18 Mar 2015, at 13:12, Martin van Diemen <address@hidden> wrote:
>
> Thanks,
>
> I've just installed the binary release which works great.
>
> I do have a virtual interfaces namede eth0:0. Monit would not recognise the interface when reloading monit:
> /etc/monit/conf.d/network:7: syntax error ':'
>
> When using quotes monit starts but monit.log shows:
> [CET Mar 18 13:04:32] error : 'eth0:0' link data gathering failed -- Cannot read /sys/class/net/eth0:0/operstate -- No such file or directory
>
> Does monit support virtual interfaces?
>
> Martin
>
> On Wed, Mar 18, 2015 at 1:09 PM, Martin Pala <address@hidden> wrote:
> We're sorry we provide only source code release and binary releases as tar.gz archive, but no deb/rpm packages ... the Debian package maintainers are very pro-active and keep the Monit package updated, you can try to rebuild it for Ubuntu: https://packages.debian.org/sid/monit
>
> Best regards,
> Martin
>
>
>
>> On 18 Mar 2015, at 11:18, Martin van Diemen <address@hidden> wrote:
>>
>> Thanks Martin,
>>
>> $ monit -V
>> This is Monit version 5.6
>>
>> Do you know a repository with a recent version? Thanks.
>>
>> Groeten,
>>
>> Martin
>>
>> On Wed, Mar 18, 2015 at 11:04 AM, Martin Pala <address@hidden> wrote:
>> Hi,
>>
>> please check your Monit version (monit -V), the network monitoring was added in Monit 5.11.
>>
>> Regards,
>> Martin
>>
>>
>>
>>
>>> On 18 Mar 2015, at 10:37, Martin van Diemen <address@hidden> wrote:
>>>
>>> Hi,
>>>
>>> I want to monitor my network interfaces with monit.
>>>
>>> I've created the following basic config file:
>>> check network eth0 with interface eth0
>>> if changed link then alert
>>>
>>> When reloading monit it would not load this config file:
>>> /etc/monit/conf.d/network:1: Error: syntax error 'eth0'
>>>
>>> I've different machines (all Ubuntu 14.04 LTS) different interfaces (eth0, eth1, lo) without any luck.
>>>
>>> According to the manual it should be that simple:
>>> http://mmonit.com/monit/documentation/monit.html#NETWORK-LINK-STATUS-TEST
>>>
>>> Any thoughts? Many Thanks!
>>>
>>> Martin
>>> --
>>> 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
>
> --
> 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
[Prev in Thread] | Current Thread | [Next in Thread] |