25 Commits

Author SHA1 Message Date
bbohm 383dfff546 Use timeout for each ping 2024-04-09 08:35:45 +02:00
bbohm bbd3242b49 Allow longer ping checks.
Old variant `ping -c3 -w3` uses deadline 3 seconds for the whole program
running, for all pings with pause between sending pings and all.

If ping deadlines it will exit with value 1 and thus failing the check.

Sometimes the check fails even if the switch is up. This is probably
because of edge case how long the ping takes and possible the switch down
prioritizes ICMP packages.

In our case it doesn't really differs if the ping is a bit slower as
long as the switch is working.

This fix has been running last 24hours and seems to work. Effectively
each ping has up to 2 seconds to complete (but for the whole check).

Another possible fix is to use `-W` that set timeout per ping.
2024-04-03 11:22:03 +02:00
bbohm 5602a3a181 gg=G and exit 1 if any switch is down. 2024-03-20 15:13:44 +01:00
erth9960 6910b315a7 Reverted inclusion of surveillance script in crontab and made it more obviously an example file. 2024-03-20 09:48:36 +01:00
erth9960 3699b802fd Eliminated tabs 2024-03-20 09:40:49 +01:00
erth9960 6926e8f02c Merge branch 'main' of gitea.dsv.su.se:DMC/netmonitor into main 2024-03-20 09:39:22 +01:00
erth9960 b016ba7eb3 Updated gitignore to ignore all conf files 2024-03-20 09:39:09 +01:00
bbohm 11b12825da Use surveillance instead of mail. 2024-03-20 09:21:53 +01:00
erth9960 de5e7f2e45 Added a readme, and made the script not depend on a hardcoded install dir 2024-03-19 16:58:05 +01:00
Erik Thuning b6d0ceae97 Printing the result is useful. 2021-10-21 15:47:38 +02:00
Erik Thuning 3b967c8066 Switch down messages should contain the word down... 2021-10-21 15:46:51 +02:00
Erik Thuning df1460fa55 Create LICENSE-gpl2.txt 2017-10-05 11:23:22 +02:00
Erik Thuning 1fa31f54c2 Fixed a bug 2017-09-28 14:40:07 +02:00
root 7668c6f231 Improved nmgrep 2015-10-09 10:52:25 +02:00
root ed29ee67ac Added nmgrep.
A tool to easily find the latest trace of a machine on the network by hostname
2015-10-09 10:28:43 +02:00
root e1c1aca22e Merge branch 'master' of https://github.com/booski/netmonitor 2015-10-09 09:39:24 +02:00
root 2b0f4ac442 Nothing important. 2015-10-09 09:38:42 +02:00
Erik Thuning d4039f63fb Minor style change 2015-09-22 09:42:20 +02:00
root eb18074a64 Cleaned up the code 2015-09-03 15:36:48 +02:00
root 60e0ddced0 Uncommented switches/vlans 2015-09-03 11:11:33 +02:00
root 43dc0e219b Added a logrotate script 2015-09-03 10:49:31 +02:00
root fe0784e090 Everything is working again 2015-09-03 10:46:29 +02:00
root f81c8d9523 Getting the IP lookup to work again 2015-09-03 09:53:21 +02:00
root 6b5506d4cb Added more files 2015-09-03 09:33:32 +02:00
root 6b1ab4e2ff Initial commit 2015-09-03 09:30:14 +02:00