Monitoring if traffic exists in interfaces of appliance fort

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
edu.info10
Posts: 4
Joined: Fri Oct 09, 2015 10:32 am

Monitoring if traffic exists in interfaces of appliance fort

Post by edu.info10 »

Hi folks
I am Brazilian, sorry for bad English
I have an appliance of FortiGate.
I need to monitor two doors that have internet links from different carriers.
Must if there is no traffic on one of the interfaces, the nagios returns critical, so I know that the link dropped
Is there a plugin for this?
If posível, give me examples.
Remembering that does not help me monitor port status (up or down), because if the internet goes down, the port status is UP, generating a false ok
Thank you, already
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Monitoring if traffic exists in interfaces of appliance

Post by hsmith »

Can you see if any of these plugins work for you?
Former Nagios Employee.
me.
edu.info10
Posts: 4
Joined: Fri Oct 09, 2015 10:32 am

Re: Monitoring if traffic exists in interfaces of appliance

Post by edu.info10 »

I have tested these plugins.

With none of them got what I want
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Monitoring if traffic exists in interfaces of appliance

Post by hsmith »

What is the model of your appliance? Those are the plugins that we have available, but you might be able to use SNMP, depending on whether or not the device supports it.
Former Nagios Employee.
me.
edu.info10
Posts: 4
Joined: Fri Oct 09, 2015 10:32 am

Re: Monitoring if traffic exists in interfaces of appliance

Post by edu.info10 »

Is a fortigade 200D

I have tested some plugins

the plugin below , I got traffic data , but I can not define that there is no traffic , generate a critical .
So I need a plugin that only examine whether or not there is traffic.

./check_iftraffic64.pl -H <IP> -C <COMUNITY>-i <interface name> -I 1000 -O 1000 -u g -c 80
OK - Average IN: 1.00MB (0.00%), Average OUT: 94.98KB (0.00%)Total RX: 13214.89GBytes, Total TX: 1589.59GBytes|inUsage=0.00%;85;80 outUsage=0.00%;85;80 inBandwidth=1.00MB outBandwidth=94.98KB inAbsolut=13214887334629B outAbsolut=1589588043237B
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Monitoring if traffic exists in interfaces of appliance

Post by hsmith »

Is the information that this plugin is returning accurate? If it is, you could write a wrapper script to do the following:

Execute the check
Break down the result of the check using ack or some other method
Do something based on what the result is
Exit with a code of 2 (critical) if those results are equal to what you want to trigger the critical state.

Does this make sense to you?

It also looks like it uses SNMP.
Former Nagios Employee.
me.
edu.info10
Posts: 4
Joined: Fri Oct 09, 2015 10:32 am

Re: Monitoring if traffic exists in interfaces of appliance

Post by edu.info10 »

Good afternoon,

Unfortunately I do not know the Perl language.

./check_iftraffic64.pl -H <ip> -C <comunity> -i "interface" -r -B -c -w 98 95

OK - Average IN: 0b (0.00%), Average OUT: 0b (0.00%) Total RX: 0bits, TX Total: 1.71Kbits | inUsage = 0.00%; 95; 98 outUsage = 0.00%; 95; 98 inBandwidth = 0b outBandwidth = 0b inAbsolut = 0B outAbsolut = 214B

This is an example where there is no traffic on the interface because the data link has fallen.

I need when there is no traffic alerts him to critical. Will know perl could give me a hand to adapt this plugin?

Since already thank you very much.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Monitoring if traffic exists in interfaces of appliance

Post by hsmith »

Are there ever going to be periods of time where there are traffic, and the situation is not critical? You don't need to know perl to write a wrapper script. This can easily be hacked together in bash.

So...if there is 0, it will always be an indication of an error? The bash script we can hack together will not do anything more intelligent than look at those values and alert based on them.
Former Nagios Employee.
me.
Locked