Choose your language

Choose your login

Support

Third Party SQL Monitoring

THE PAGE APPLIES TO:

Special thanks to Minja Koncul from Dexit, Italy for the contribution of this information.

This knowledge base article covers the installation and configuration of third party software and is not supported by PaperCut.

This article is aimed at administrators who need absolute uptime for printing if there are communication issues between the SQL server and PaperCut by stopping the PaperCut service if the database stops responding.

Installation of PRTG Network Monitor

Install PRTG Network Monitor on your PaperCut Application Server. Please note that the free version of PRTG Network Monitor has a 10 sensor limit, however we only require one sensor for this configuration.

Add a new host

The host will be the database server, in this example case, HOUSAB with MySQL

Add a new sensor

You will need to add a new sensor which checks if the database responds to a simple query. The configuration Minja used in his findings are as follows.

  • Sensor Name: MySQL papercut
  • Tags: sqlsensor
  • Priority: 5 stars
  • Port: Automatic
  • Timeout: 10 seconds

DB/SQL Data

  • Database: Papercut
  • User: [DBUSER]
  • Password: [DBUSER_PASSWORD]
  • SQL-Expression: SELECT COUNT(scheduled_report_id) FROM papercut.tbl_scheduled_report;*
  • Postprocessing: Process numerical result
  • Recordcount: Count number of records
  • Condition Warning: does not equal
  • Value: 1
  • Condition Down: does not equal
  • Value: 1

Add the component PTF launcher

Since the PRTG Network Monitor runs as a service on the application server, you will need to add the PTF Custom Notifications program that allows PRTG to stop the PaperCut Application Server service in a case of communication failure. Please note that use of this component requires that a user session is always active.

Configuration of the PTF Custom Notifications can be found below: http://www.prtgtoolsfamily.com/us/launcher.html

Configuring notifications to stop the PaperCut Service

Now PRTG is configured, you will need to create the notifications that will be sent to the PaperCut Application Server service along with the parameters used for when there is a communication issue with the database.

PRTG > Setup > Notifications

  • Notification Name: Stop-papercut-service
  • Status: Started
  • Schedule: None
  • Postpone: Yes
  • Method: Send first DOWN and UP message ASAP, summarize others
  • Execute Program: Checked
  • Program file: Launch.exe (if Launch.exe is not present, see PTF Launcher guide, step 3)
  • Parameter: -s=cmd -a=/K net stop PCAppServer
  • Domain or Computer name: [YOURDOMAIN-OR-COMPUTERNAME]
  • Username: [USERNAME] (needs to be able to perform net stop command)
  • Password: [PASSWORD]
  • Timeout: 60

Configuring notifications to start the PaperCut Service

  • Notification Name: Start-papercut-service
  • Parameter: -s=cmd -a=/K net start PCAppServer

Configuring a notification trigger

MySQL sensor > Notifications > Add a new State Trigger:

  • When sensor is Down for at least 1 second perform Stop-papercut-service
  • When condition continues for at least 300 seconds, perform no notification and repeat every 0 minutes
  • When condition clears, perform Start-papercut-service

Testing

Stop your database during a scheduled downtime to verify that the PaperCut service is stopped automatically after 1 minute. If it does not, run through setup again and ensure all settings are correctly configured, and that usernames and passwords used have access to this service.


Categories: How-to Articles , Monitoring


Keywords: MySQL , PRTG , monitoring , network , communication , SQL , database , failover , failure mode

Comments

Last updated June 13, 2024