{% extends 'base.html.twig' %} {% block title %}{% trans %}Monitoring{% endtrans %}{% endblock %} {% block body %}
{% trans with {'%URL%': absolute_url(path('monitoring_status')), '%NOTIFICATION_URL%': path('notification')} %} PrinterWatchdog comes with an integrated api for external monitoring tools like Nagios. The page %URL% returns the state of monitored printers in json format. You can define the notification level on Notification page. Define the ip(s) of your monitoring Tool(s) as allowed ip(s) in .env file to increase the security.

For Nagios see the config example below. {% endtrans %}
{{'Current state:'|trans}} {{ monitoringState|raw }}

{{'Configure Nagios'|trans}}

  1. {{'Define the IP address of your Nagios installation in the .env file'|trans}}
  2. {{'Copy /extras/nagios_plugin/check_printerwatchdog to your Nagios plugins folder. (eg. /var/lib/nagios/plugins)'|trans}}
  3. {{'Create a service command template'|trans}}
  4. {{'Create a service check on your host'|trans}}

{{'Command Template'|trans}}


    define command {
        command_name    check_printerwatchdog
        command_line    $USER1$/check_printerwatchdog $ARG1$
        }
                

{{'Service Template'|trans}}


    define service{
        use                     generic-service
        host_name               {{ app.request.gethost }}
        service_description     My PrinterWatchdog Install
        check_command           check_printerwatchdog!{{absolute_url(path('monitoring_status'))}}
        }
            
{% endblock %}