Skip to content
CyberOpsSec
CyberOpsSec

Just another cybersecurity site

  • Home
  • Posts
  • Knowledge
    • Auditing
    • Linux Commands
    • Ports & Protocols
    • Scanning
    • Sniffing
    • Syslog
    • Vulnerability/Patch Mgmt
  • About
  • Contact
CyberOpsSec

Just another cybersecurity site

PRTG – How to monitor a Linux service

Admin, January 2, 2026January 2, 2026

It’s not exactly straight forward on how to do this. I figured a blog post would be helpful

Step 1: Create user
Create an PRTG user account on your linux machine and change the password
sudo useradd prtg
sudo passwd RandomPassword

Step 2: Create folder
PRTG software specifically looks in /var/prtg/scripts, so you will have to create that directory for the script to reside in
cd /var
mkdir prtg
cd prtg
mkdir scripts

Step 3: Create script

cd /var/prtg/scripts
sudo nano check_snort.sh

status=$(systemctl is-active snort)
if [ "$status" = "active" ]; then
echo "0:1:Service is running"
else
echo "2:0:Service is $status"
fi

You can change “snort” to whatever service you’re trying to monitor. After you close out of Nano, you have to make it executable with
sudo chmod +x check_snort.sh

If you run the script you should see this as an output.

0 is the return code which PRTG needs to see if the script succeeds or fails, followed by the value PRTG looks at of 1 (meaning active).

Step 4: Update PRTG group with prtg user credentials

Step 5: Add and modify sensor

If you don’t see the name of the script in that field then you need to double check you made the appropriate folder in step 2.

Modify the channel value to something like screenshot.

To simulate the service being down to make sure the sensor is working you can stop the service:
sudo systemctl stop snort

To bring it back up
sudo systemctl start snort

Tools

Post navigation

Previous post

Related Posts

Patch Mgmt – Windows Update Issues

November 6, 2025November 6, 2025

What if your patch management solution fails to install certain updates? The answer: WinRM and…

Read More

BloodHound CE Setup

June 24, 2025August 11, 2025

I’ve always had trouble getting BH running properly and finally decided to make a post…

Read More

Leave a Reply Cancel reply

You must be logged in to post a comment.

Recent Posts

  • PRTG – How to monitor a Linux service
  • Patch Mgmt – Windows Update Issues
  • MSSQL Auditing
  • BloodHound CE Setup
  • UBI – User Browsing Isolation

Recent Comments

No comments to show.

Archives

  • January 2026
  • November 2025
  • August 2025
  • June 2025
  • November 2024
  • September 2024
  • June 2024
  • May 2024
  • March 2024
  • January 2024
  • November 2023
  • September 2023

Categories

  • Audit
  • EPP
  • Tools
  • Uncategorized
  • Vulnerabilities
©2026 CyberOpsSec | WordPress Theme by SuperbThemes