Skip to content

How to monitor kubernetes pod status with PRTG

Last updated on February 8, 2023

Since there is no official kubernetes support by PRTG, I decided to create something fast and simple by my own. It took 10 minutes to write the script and configure PRTG sensor.

1. Create shell script

touch /var/prtg/scripts/

2. Add the content to the script

status=$(kubectl get pods |grep elasticsearch-master-0 |awk '{print $3}')
if [ "$status" == Running ]
echo "0:200:$status"
if [ $serviceIsRunning == false ]
echo "2:404:$status"

3. Save the script and make it executable

chmod +x

Try to run it



Go to the PRTG, and add the SSH Script sensor to the device

In the ‘Script’ field choose and SAVE

Normal response will be “200 Running”

! Make sure your PRTG Server has access to Asterisk Server, if not, add root username and password to the credentials in the BASIC DEVICE SETTINGS

And here’s the result:

I also have telegram notification alerts configured in PRTG, so I get the notifications in telegram group like this:

Published inAutomationKubernetesLinuxPRTGScriptShell