![]() Wget -O/dev/null "$prtghost/$identtoken?content=$service status0Service: $service is down, but will restart!" #Send response to PRTG that the service is not started. Wget -O/dev/null "$prtghost/$identtoken?content=$service status1Service: $service is running!" #Send response to PRTG that the service is running. If (( $(pgrep -x $service | wc -l) > 0 )) #Enter the Identification Token of the HTTP Push Data Advanced sensor. #Enter the server address of your PRTG, including HTTPS/HTTP and the sensor port. #The script also tries to restart the service if it is not started. #This script checks if a certain service is running. Save the following script on the target system, where it can be executed by CRON. The script also sends sensor messages like $service is running, $service is down, $service restarted properly, and $service can't restart properly. ![]() Value "1" means that the service is up and value "0" means that the service is down or could not properly restart.If the service is up, the script sends a report to the PRTG core server with the value "1". ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |