Disk monitoring on remote hosts

Hello,

I have icinga2 installed on my monitoring server and I want to use it to monitor disk utilization on remote hosts. When I added disk checks, it checks the disk utilization of the monitoring server itself and not the utilization of the remote host, how can I add disk monitoring remotely?

Regards,

You need to set “command_endpoint” in your service check definitions to be the
machine you want the check to be run on.

Antony.

Right now my hosts.conf and services.conf look like as follows: Could you please let me know how to add command_endpoint in my setup. I have a basic setup so far with just icinga2 installed on my monitoring server.

  • Hosts.conf-

/* Define disks and attributes for service apply rules in services.conf. /
vars.disks[“disk”] = {
/
No parameters. */
}
vars.disks[“disk /”] = {
disk_partitions = “/”
}
vars.disks[“disk /opt”] = {
disk_partitions = “/opt”
}

and services.conf look like this:

apply Service for (disk => config in host.vars.disks) {
import “generic-service”

check_command = “disk”

vars += config
}

Right now my hosts.conf and services.conf look like as follows: Could you
please let me know how to add command_endpoint in my setup.

You need to add the hostname to the service check so that it performs the
check on that host instead of on the Icinga server.

services.conf look like this:

apply Service for (disk => config in host.vars.disks) {
import “generic-service”

check_command = “disk”

Add here:

command_endpoint = host.name

vars += config
}

See Distributed Monitoring - Icinga 2
and specifically the section #pin-checks-in-a-zone for more details.

Regards,

Antony.

ok, right now I just have a basic setup with icinga2 installed, would remote monitoring need an agent setup? Where can I find the exact procedure for the agent setup?

Thanks

ok, right now I just have a basic setup with icinga2 installed, would
remote monitoring need an agent setup?

Er, yes - otherwise there is nothing to run the service check on the remote
machine.

Where can I find the exact procedure for the agent setup?

https://icinga.com/docs/icinga2/latest/doc/06-distributed-monitoring/
and
https://icinga.com/docs/icinga2/latest/doc/07-agent-based-monitoring/

Antony.

Alternatively, set up SNMP on the hosts you want to monitor, and use appropriate plugins (e.g. “check_snmp_storage”) doing queries from your central Icinga server. Then you don’t need any checks running on the hosts, and only one end-point (the std. one of the Icinga server itself).