We can integrate script checks into Consul. To do so with Nagios:
- Install nagios-plugins-basic. That will contain some basic checks such as disk util, and cpu load
apt-get install nagios-plugins-basic
- There are also other custom Nagios checks on the internet for eg: checks for Open Connections
Put this script in:
/usr/lib/nagios/plugins
- Create JSON config (connections.json) and put it under /etc/consul.d/client
{
“check”: {
“name”: “Open Connections”,
“interval”: “60s”,
“args”: [“/usr/lib/nagios/plugins/check_connections”, “-c”, “{{connection_limit_critical}}”, “-w”, “{{connection_limit_warn}}” ],
“status”: “passing”
}}
- Restart Consul service
- You should see this on Consul UI
Leave a Reply