Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The NetMon icon defines a Network Monitor process, allowing the RediGate to detect certain conditions in the system or networking, such as: ping success/failure, RTDB register value, network port or interface status, etc. If the measured 'condition' value matches a certain criteria, an action is performed in response, such as: send pings, switch redundant path, write to an RTDB register, restart networking, or run a script.

Each NetMon instance runs independently and tracksepsperforms its condition checking and actions independently from all other instances. The same Monitor or Action Register may be used by more than one NetMon instance to store similar information, but realize that each NetMon instance will overwrite the value stored by other instances.

AttributesFunction
Object TypeNetMon
Parent(s)System → Networks → NetworkMonitor
Instance

Enter a unique instance number between 0 and 99. 

PropertiesValues
MONITOR IntervalEnter period (in seconds) for how often to check the system condition.
Condition 

Select which network condition to monitor. For most conditions, the actual measured value is checked against VALUE property, using the comparison type specified in Criteria. A resulting action will be triggered if the Criteria is satisfied.

  • No Criteria Always trigger on MONITOR Interval (timed action).
  • PING FAIL – Send one ping at a time (to one or more network addresses) and check the failure count. Trigger only occurs if pings to ALL addresses fail a number of sequential times as compared with VALUE. If "Interface or Register" property is set to a Linux interface (such as "eth0" or "ppp0"), that interface will be enforced for pings. Otherwise, leave Interface blank to send ping according to network routing rules.
  • PING GOOD – Send one ping (to one or more network addresses) and check success counter. Trigger occurs if pings to ANY address succeeds a number of sequential times as compared with VALUE. If "Interface or Register" property is set to a Linux interface (such as "eth0" or "ppp0"), that interface will be enforced for pings. Otherwise, leave Interface blank to send ping according to network routing rules.
  • READ REGISTER value – Read the value specified in Channel/RTU and compare with VALUE. The "Interface or Register" property must be set to the RTDB numeric register (e.g. 40001) or the register's Tag name.
  • RX PACKET COUNT on Interface – Compare VALUE with the Linux network specified in the "Interface or Register" property (such as "eth0", "ppp0", etc.) for the total "RX packets" count in 'ifconfig'.
  • RX PACKET ERROR on Interface – Compare VALUE with the Linux network specified in the "Interface or Register" property (such as "eth0", "ppp0", etc.) for the total RX packets "error" count in 'ifconfig'.
  • # of STATIC ROUTES on Interface or all – Compare VALUE with the number of 'route' entries. If the "Interface or Register property specifies a Linux interface (such as "eth0", "ppp0", etc.), only count those. If Interface is left blank, then count all route entries on all interfaces.
  • # of ESTABLISHED port connections – Compare VALUE with the number of entries in 'netstat' which have "ESTABLISHED" TCP connections. Set the "Interface or Register" property to be a specific numeric port number to check for ESTABLISHED connections, or leave it blank to check for all ports.
  • # of FAILED PASSWORD login attempts – Compare VALUE with the number of "Failed password" entries in /var/log/auth.log. Login count resets on reboot or if a large auth.log file is reset by the log file management.
  • # of ACCEPTED PASSWORD logins – Compare VALUE with the number of "Accepted password" entries in /var/log/auth.log. Login count resets on reboot or if a large auth.log file is reset by the log file management.
Criteria

Select the criteria to use for detecting a trigger condition that will result in an Action. The measured value obtained from the Condition, above, is compared with the VALUE property of this NetMon instance. Criteria may be:

  • Measured value is "Greater than or equal to" the VALUE property (or "Greater than", "Less than or equal to", "Less than", "Equal to", or "Not equal to" VALUE)
  • For the following options (Changed, Increased, Decreased), the VALUE must be a positive integer. The measured value is compared with the value obtained the last time the action was triggered. On startup, the "last value" is set to current value the first time this NetMon instance runs.
  • Changed ≥ Value – The action will occur if the measured value changes (increase or decrease) more than the amount specified in the VALUE property. (NOTE that a number that wraps around positively or negatively will count as a change and cause a trigger.)
  • Increased ≥ Value – The action will occur if the measured value increases more than the amount specified in the VALUE property. A value that stays the same or decreases will NOT cause a trigger. (NOTE that a decreasing integer that wraps from 0 to a large maximum value will be counted as an increase. However, for an increasing integer that wraps around to a small number, the "last value" will be taken as 0 for comparison.)
  • NOT Increased ≥ Value – The action will occur if the measured value does not increase more than the amount specified in the VALUE property. This can detect a value which should normally increase (such as network packet count or a PLC heartbeat) but stops incrementing for some reason. A value that stays the same or decreases will cause a trigger. (NOTE that a decreasing integer that wraps from 0 to a large value will be counted as an increase. A large increasing integer that wraps to a small number will cause a trigger.)
  • Decreased ≥ Value – The action will occur if the measured value decreases more than the amount specified in the VALUE property. A value that stays the same or increases will NOT cause a trigger. (NOTE that an increasing integer that wraps from a large maximum value to 0 will be counted as a decrease. A decreasing integer that wraps from 0 to a large value will not be counted as a decrease.)
VALUESigned integer value (-2,000,000,000 to 2,000,000,000) used for comparison with measured system Condition value according to Criteria.
ChannelMaster Channel number (0-15) used for READ REGISTER condition. Unused for other options.
RTU Field Unit number used for READ REGISTER condition. Unused for other options. 
Interface or Register
  • For Condition options using a network interface (RX PACKET or ERROR count, STATIC ROUTES), this property should be set to the Linux interface name (such as "eth0" or "ppp0"). For STATIC ROUTES, leave it blank to count all route entries on all interfaces.
  • For the READ REGISTER condition, this property should be set to the numeric register address in the RTDB (e.g. 40001) or the register's Tag name (up to 127 characters).
  • For the ESTABLISHED Ports condition, this property can be set to a specific numeric TCP port, or leave it blank to check all ports.
  • Otherwise, this field is ignored.
Ping Addresses The Ping Addresses table should contain a list of one or more network addresses (numeric IPv4 address or named server) to use for the PING GOOD or PING FAIL condition. It is ignored for all other monitoring conditions. When using named server addresses, make sure DNS is used to resolve network names.
Redundant Path 

The Network Monitor may be used to control routing for installations including a Primary/Secondary network path that require static routes or default gateway to be changed dynamically.

For instance, a RediGate may have primary path on satellite and secondary path over cellular. The system might be set up with one NetMon instance sending a ping over satellite (only while on the primary path), which if it fails will switch routing to the cellular network. Another NetMon instance could run (only while on the secondary path) to send pings over the satellite to detect when the primary path becomes available again.

The Redundant Path property is used as an additional qualification to allow the Condition checking for this NetMon instance only when the network is on either the primary or secondary path.

  • N/A – Set this to "N/A" if not using this NetMon instance for redundant path control.
  • Action on Path 0 ONLY – Only check the Condition when the RediGate is on Path 0. The RediGate is assumed to be on Path 0 at startup and after running the Action "Switch to PATH 0".
  • Action on Path 1 ONLY – Only check the Condition when the RediGate is on Path 1. The RediGate is assumed to be on Path 1 after running the Action "Switch to PATH 1".
ACTION Taken 

If the NetMon instance verifies that a system or network Condition value meets the specified Criteria, an Action will be taken. Select an action from the following options:

  • None – This option only results in the Monitor Register (below) being updated with the current system value used in the Condition checking, but otherwise no action is taken if the Criteria is satisfied.
  • SEND PINGS – If Criteria is satisfied, send one or more pings to a network address. The number of pings to send is configured in the Ping Count property. The destination (IPv4 address or named server) must be configured in the Action Text property (which may be prefixed with ping options -I, -s, and/or -W).
  • Switch to PATH 0 – Run the Linux command (or script) configured in the Action Text fieldproperty, which will be treated considered as a switch in redundant paths change from Path 1 to Path 0. For instance, the command or script might add a static route, change default gateway, etc.
  • Switch to PATH 1 – Run the Linux command (or script) configured in the Action Text fieldproperty, which will be treated considered as a switch in redundant paths change from Path 0 to Path 1.
  • Run SCRIPTRun the Linux command (or script) configured in the Action Text fieldproperty. This will not result in a perceived change of state in be considered to indicate a change between the redundant Path 0/Path 1 statestates.
  • REGISTER WRITE – Write a value into an RTDB register location. The value to write is configured in the Action Text property (this may be an integer value, floating point value for REAL32 registers, or a String value for string registers. The Master Channel/RTU/Register address to write the value is configured in the the value to write should be of an appropriate data type for the destination register type). The value is written to the database address specified by the NOTIFY Channel, NOTIFY Rtu, and Action Register properties (the register must be numeric).
  • Restart ETHERNET Ports – Restart all Ethernet networking on all Ethernet ports with the Linux command: S40network restart
  • Restart CELLULAR Ports – Reset cellular networking with the Linux command: S15cellmodem restart. This only applies when using an Elecsys internal modem.
  • Restart CELL MODEM –  Power cycle and completely restart cellular modem networking with the Linux command: S11emux restart (on RediGate 100) or or: S03emux restart (on RediGate 400). This only applies when using an Elecsys internal modem.
  • RECONFIGURE – Issue 'reconfigure' command to restart RediGate operation and/or install newly loaded configuration. Reconfigure will be delayed 30 seconds after the Action triggersis triggered.
  • REBOOT Linux – Shutdown and restart the RediGate. Reboot will be delayed 30 seconds after the Action triggersis triggered.
Ping Count Number of pings to send to destination address (only used for SEND PINGS action).
Action Text 

Text field containing properties used for several Action types (up to 255 characters).

  • For SEND PINGS action, this property must contain the IP address or named server to ping. When using named server addresses, make sure DNS is used to resolve network names. Destination address can be prefixed with one or more ping options before the address, including:

-I iface    (uppercase 'I') specify ping on Linux interface 'iface' (e.g., "eth0")
-s size    
(lowercase 's') send 'size' data bytes in packets each packet (default 56)
-W sec      
(uppercase 'W') timeout of 'sec' seconds to wait for ping response for 'sec' seconds (default 10)

For instance, if the desired Action is to ping the address 'www.google.com' 5 times, specifically over interface eth0, with a ping timeout of 15 seconds, the Ping Count would be 5, and the Action Text would be:  -I eth0 -W 15 www.google.com

  • For Run SCRIPT or Switch to PATH actions, this property must contain the Linux command line (script or command, with all parameters) to execute.
  • For REGISTER WRITE action, this property must be set to the value to be written into an RTDB register (integer, floating point number, Boolean 1 or 0, or string).
  • For all other actions, this property is ignored. 
NOTIFY Channel Master Channel number to store the value of a system Condition whenever it is checked by the NetMon process, and to store the result of an Action.
NOTIFY Rtu Field Unit address to store the value of a system Condition whenever it is checked by the NetMon process, and to store the result of an Action.
Monitor Register 

RTDB register address (or Tag name, up to 100 characters) to store the value of a system Condition whenever it is checked by the NetMon process after each 'MONITOR Interval' (if the current path matches the Redundant Path setting). Values stored for each Condition are:

  • No Criteria – Store '1'.
  • PING FAIL – Store count of failed pings on any address (single counter, resets to 0 if any ping is successful).
  • PING GOOD – Store the largest successful ping count on any address.
  • READ REGISTER value – Store value obtained from source RTDB register.
  • RX PACKET COUNT on Interface – Store RX packet count (should be UINT32).
  • RX PACKET ERROR on Interface – Store RX error packet count (should be UINT32).
  • # of STATIC ROUTES on Interface or all – Store number of static route entries.
  • # of ESTABLISHED port connections – Store number of ESTABLISHED port connections.
  • # of FAILED PASSWORD login attempts – Store number of failed logins.
  • # of ACCEPTED PASSWORD logins – Store number of successful logins.
Action Register 

RTDB register address (or Tag name, up to 100 characters) to store the result of an Action whenever it occurs (no change is made unless the Action occurs). Values stored for each Action are:

  • None – Nothing is stored.
  • SEND PINGS – Store number of successful pings resulting from Action (Note, this is different from the pings sent by the 'ping' Condition checking options).
  • Switch to PATH 0 – Store '0' ('0' is also stored in /tmp/director/NetMonPath).
  • Switch to PATH 1 – Store '1' ('1' is also stored in /tmp/director/NetMonPath).
  • Run SCRIPT – Store the number of times the 'Action' has triggered the script to run.
  • REGISTER WRITE – Store the value in the Action Text property. Note that the Action Register should be defined in the RTDB as the correct type (Strings can't be stored into Integer registers, etc.).
  • Restart ETHERNET Ports – Store the number of times the 'Action' has triggered an Ethernet restart.
  • Restart CELLULAR Ports – Store the number of times the 'Action' has triggered a cellular reset.
  • Restart CELL MODEM – Store the number of times the 'Action' has triggered a hard reboot of the modem reboot.
  • RECONFIGURE – Store '1'.
  • REBOOT Linux – Store '1'.
Debug Level 

Set the default Debug Level of this NetMon instance at RediGate startup. Options are the same as in RediGate debugging menu: 0=Fatal Errors only, through 4=Data Dump/verbose output.

The additional option 5=Engineering (extra verbose) output generates even more diagnostic information in RediGate diagnostics and at the command line and is not generally intended for customer use.

The Debug Level for NetMon processes cannot currently be set within the normal RediGate diagnostics menu. However, a command line process can be used to change the Debug Level during operation. Contact Elecsys for details.

...