Adding process monitor

This section describes how to add Servwatch process monitoring.

Edit configuration file

To add a process monitor, add the monitored process name to the agent settings file on the monitored server and restart the agent.

Navigate to the location of the configuration file.

1 cd /opt/servwatch-agent/config

Edit the configuration file.

1 vim default.json

Add the service name (example: httpd) you want to monitor in the following places.

1 2 3 4 5 6 { "device_id":"hostname", "user_id":"U000***", "device_token":"************************", "watch_service": "httpd" // List the services you want to monitor, separated by commas. }

Restart agent

Restarting agent to enable process monitor.

1 pm2 restart servwatch_agent

The metric "service: <service name>" is now available in the condition settings when creating the event.

The event threshold can be set as "OK" for operating normal and "NG" for operating abnormal.