First, it’s essential discover out the situation the place your 360 Monitoring plugins are presently put in. To take action, merely execute the next code:
Plugins enabled: ping, apt-updates, system, iostat, httpd, loadavg, reminiscence, mysql, nginx, diskusage, community, course of, docker, cpu, swap
Plugins listing: /usr/native/lib/python3.7/dist-packages/agent360/plugins
As described within the documentation for the plugins, it’s going to now inform you the precise location. Subsequent up, for my plugin I have to create a file, which I’ve named plesk-wpt.py within the given folder (i.e. within the location found within the earlier step).
Now merely open the file, paste the code and reserve it.
Earlier than testing, we want to verify the consumer agent360 is allowed to entry the Plesk command line with sudo and with out password. Due to this fact we’re including the next line to /and so forth/sudoers:
agent360 ALL=(ALL) NOPASSWD: /usr/sbin/plesk
To confirm the plugin is put in and all information could be fetched, run this code:
sudo -u agent360 agent360 check plesk-wpt
Now it’s best to get an output with the precise information. To lastly activate the plugin and ensure the info is reported within the 360 Monitoring infrastructure, we have to add the next strains to /and so forth/agent360.ini:
enabled = sure
interval = 600
This configuration tells the agent360 not solely to start out utilizing the plugin however to report the standing each 600 seconds.
As soon as performed, restart the monitoring service:
service agent360 restart