What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

SSH Script Linux - API

Votes:

0

We are currently testing using PRTG for network and server monitoring. We run Windows Servers and Ubuntu servers.

I am a Windows tech, but need to get PRTG monitoring our Ubuntu Linux servers. I have the basic out of box probes running on Ubuntu, and am currently collecting data.

We would like to look into running SSH script probes on the Linux systems. We want to monitor master/slave replication, Docker activities, and MySql activitiies.

I have read the Linux system needs to have the API installed and have our scripts in the PRTG folder.

I cannot figure out how to get the API on the Linux systems. Can someone shed light on how i can get the API on the Linux systems.

Thanks for the help!

-Evan

linux ssh ssh-script ubuntu

Created on Jan 10, 2019 5:01:19 PM



7 Replies

Votes:

0

Hello evan631,

Thank you very much for your contact.

Just to check, did you already review the following articles:

The linked article describe approaches on how to be deployed properly.

Would you please let me know, whether this suits your requirements?

Best,
Sebastian

Created on Jan 11, 2019 12:06:55 PM by  Sebastian Kniege [Paessler Support]

Last change on Jan 11, 2019 12:07:03 PM by  Sebastian Kniege [Paessler Support]



Votes:

0

Thanks for your reply!

It is still not clear where I get or how to use the PRTG API to run SSH scripts on Linux.

I see mentioned that scripts need to be in the PRTG folder on the linux box, but how do i get that folder there.

Thanks

-Evan

Created on Jan 11, 2019 2:45:31 PM



Votes:

0

Hello Evan,

Thank you very much for your response.

I have read the Linux system needs to have the API installed and have our scripts in the PRTG folder.

May I ask where you have read this?
Usually, you must store the script file on the system of the probe where you create the sensor: If used on a remote probe, you must store the file on the system running the remote probe.

Per default, scripts are stored are stored in the following directory of the corresponding probe device:
C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors

Thank you in advance for your answer.
Sebastian

Created on Jan 14, 2019 1:13:35 PM by  Sebastian Kniege [Paessler Support]



Votes:

0

Thanks for your reply Sebastian!

This is right on the PRTG site...

https://www.paessler.com/manuals/prtg/ssh_script_sensor

The SSH Script sensor connects to a Linux/Unix system via Secure Shell (SSH) and executes a script file located on the target system. This option is provided as part of the PRTG Application Programming Interface (API). ....

For security reasons, you must store your script file on the target system. The file must be located in the directory /var/prtg/scripts.

....

Select a script file from the list. The dropdown menu will list all script files available in the /var/prtg/scripts directory on the target Linux/Unix system. For a script file to appear in this list, store the target file into this directory. Ensure the script has executable rights.

Created on Jan 14, 2019 4:42:15 PM



Votes:

0

Hello evan61,

There are multiple ways of storing a script file in /var/prtg/scripts, for instance via PuTTY.

Best regards,
Sebastian

Created on Jan 15, 2019 10:28:39 AM by  Sebastian Kniege [Paessler Support]



Votes:

0

I am having the same issue. I created /var/prtg/scripts on the linux destination server and created a test2.sh within this directory to check for a vmtoolsd process. If running, it will produce output: 1:vmtoolsd:up If not running, it will produce output: 2:vmtoolsd:down. I also added the test2.sh script to C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors on the probe which the destination linux server is under. I still do not see my script in the dropdown list. Can someone please advise where it exactly needs to be?

Created on Apr 29, 2020 4:16:07 PM



Votes:

0

FYI.. i figured it was a permissions issue on /var/prtg/ and /var/prtg/scripts.

Created on Apr 29, 2020 5:57:44 PM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.