ThinkIn - Alerts and Widgets

  • 16 July 2021
  • 1 reply
  • 138 views

  • Anonymous
  • 0 replies

Please find the material presented during the 2021 ThinkIn session on Alerts and Widgets attached to this article as well as the complete video recording from the session on Youtube via this link:

https://www.youtube.com/watch?v=I2OvY72XtrY

The scripts mentioned during the presentation can also be downloaded from here.

A few words on each of the scripts.

pm_analyzer.py

The primary purpose of the pm_analyzer.py script is to provide information about the performance of each livesearch. It is usually run interactively from the shell on systems experiencing performance issues with livesearches - widgets not updating, or alerts not firing as they should.

Although the script will need to run for as long as the longest update cycle for any livesearch takes (which it doesn't inform about - yet) to provide complete information on all livesearches - on most systems the issues would probably become evident sooner as the performance would most likely be impacted by resource hogs that are updating frequently and therefore become visible faster.

The script uses tcpdump on the merger port lo:5555 port and therefore requires root privileges to run.

premerger_mon.py 

This script will read the premerger configuration and based on that information monitor the merger port lo:5555 to verify that the premerger is actually doing what is in the configuration and report into /var/log/syslog if a livesearch is missed or delayed (currently set to warn when a livesearch is . The script is designed to run from /root via cron - and will require root privileges to run as is uses tcpdump on lo:5555.

The header of the script will instruct how to setup the root crontab to get it to run properly - basically add the following line too root crontab using the crontab command:

life.py

This script is an improved version of the somewhat "hidden" script named lifegrp.py which is/was part of the premerger service installation. The script doesn't need privileges to run and will perform a lookup on a given life_id or lifegrp to list information about the owner, query, repo selection, time range etc of the livesearch - this can be used to identify potential optimisations and direct the information towards the owner of the livesearch.

The scripts will be updated occasionally so do drop by when in the neighborhood ;-)

Questions are always welcome!

Enjoy!

Peter Melsen


Reply