User Tools

Site Tools


tools:ipdr_watchdog

IPDR Watchdog

What is the use of this tool ?

Real time IPDR monitoring system that alerts when IPDR is down by sending email and syslog.

How it works ?

  • First it checks the last log timestamp with current system timestamp and check the difference is below 1min.
  • Then it check for the latest flush log and compares the timestamp with system timestamp and the difference should be in less than 1min.
  • It also check flush is not equal to 0.
  • If the above condition fails then it send the syslog
  • And trisul-hub will send mail if email server is configured and enabled

Procedure before running the script

  • Login as admin and go to (profile0 –> email config)
  • Configure email on trisul server
  • Start the email notification
  • Configure alert whom you want to send mail
  • Go to profile0 → All groups alert → and click edit option → change Send to Syslog/Email to Alert
  • Log into trisul server and assign a cronjob to run ipdr_watchdog script or you can run manually.

Options

Option Default value Info
-n 2 No of Engines
-c context0 Context Name
-s Hostname of your system Sytem Name
-k 0 verbose
The verbose argument will send syslog if the system is running . But doesn't send mail

Examples Using cronjob

* /10* * * * /usr/local/share/trisul-hub/ipdr_watchdog.sh

When the IPDR down you get this type of syslog

May  9 05:55:01 IPDR-TESTING trisul_flushd: Alert:probe0:context0:1715234100:0,0,0,0,0,IPDRUP:mailsubject:Trisul IPDR Alert System DOWN IPDR TESTING:mailsubjectUser ,Last flush time : (Thu May  9 05:55:00 AM UTC 2024)

When you assign a cronjob with -k argument you will get this syslog if the system is running

May  9 07:12:01 IPDR-TESTING infod: IPDR-TESTING  RUNNING

When your system is started after the down stauts you will get this syslog

May  9 05:55:01 IPDR-TESTING trisul_flushd: Alert:probe0:context0:1715234100:0,0,0,0,0,IPDRUP:mailsubject:Trisul IPDR Alert System UP IPDR TESTING:mailsubjectUser ,Last flush time : (Thu May  9 05:55:00 AM UTC 2024)
When you start the IPDR system after the IPDR-DOWN then you will be notified about the incident through mail

Examples without using cronjob
/usr/local/share/trisul-hub/ipdr_watchdog.sh /ipdr_watchdog.sh

tools/ipdr_watchdog.txt · Last modified: 2024/05/10 11:42 by vignesh