SURFscz / SRAM-deploy

Deploy scripts for the SCZ
Apache License 2.0
5 stars 5 forks source link

Monitor how long plsc run takes #413

Closed baszoetekouw closed 1 year ago

baszoetekouw commented 1 year ago

We need to monitor how long the plsc run takes, so that we can take action if this becomes too long. I've already checked Zabbix's systemd properties to see if we can easily find it there, but systemd doesn't store the run duration of timers.

A simpel script based on this output:

╰─▶ journalctl -u plsc -n 3 JOB_TYPE=start -o json | jq '[.MESSAGE,.__MONOTONIC_TIMESTAMP]'
[
  "Starting PLSC Runner...",
  "1759086333233"
]
[
  "Finished PLSC Runner.",
  "1759164788548"
]
[
  "Starting PLSC Runner...",
  "1759229826417"
]

which subtracts the timestamps should work though.

baszoetekouw commented 1 year ago

Script is gedeployed, moet nog in zabbix

baszoetekouw commented 1 year ago

Works; https://zabbix.sram.surf.nl/history.php?action=showgraph&itemids%5B%5D=56268