Windows Machine Monitor Disk usage
Posted: Thu Oct 31, 2019 3:24 am
Hello,
I have nagios core 4.4.5 and ncpa 2.2.0
I followed this guide:
https://assets.nagios.com/downloads/nag ... ndows.html and installed n
then followed this guide https://assets.nagios.com/downloads/nag ... erview.pdf
added a cfg in the windows machine under C:\Program Files (x86)\Nagios\NCPA\etc\ncpa.cfg.d\ with the following lines.
[passive checks]
%HOSTNAME%|__HOST__ = system/agent_version
%HOSTNAME%|CPU Usage = cpu/percent --warning 60 --critical 80 --aggregate avg
%HOSTNAME%|Memory Usage = memory/virtual --warning 80 --critical 90 --units Gi
%HOSTNAME%|Process Count = processes --warning 300 --critical 400
%HOSTNAME%|Disk Usage = disk/logical/C:|/used_percent --warning 80 --critical 90 --units Gi
I found the check for disk usage in the example.cfg provided with ncpa2.2.0 in the windows machine.
Now I have a question:
In the guides there is no explanation on how I should define the "Disk Usage" service check in nagios core.
If I give journalctl -xe in nagios core I don't see any particular anomalies.
I can see the Cpu Usage, Memory Usage, Process Count, __HOST__ checks but I can't see the Disk Usage.
The configuration file in nagios core for the windows machine is this one:
define host {
host_name SERVER_NAME
address IP_ADDRESS
check_command check_ncpa!-t 'TOKEN' -P 5693 -M system/agent_version
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
contacts nagiosadmin
notification_interval 60
notification_period 24x7
notifications_enabled 1
icon_image ncpa.png
statusmap_image ncpa.png
register 1
}
define service {
host_name SERVER_NAME
service_description CPU Usage
check_command check_ncpa!-t 'TOKEN' -P 5693 -M cpu/percent -w 20 -c 40 -q 'aggregate=avg'
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}
define service {
host_name SERVER_NAME
service_description Memory Usage
check_command check_ncpa!-t 'TOKEN' -P 5693 -M memory/virtual -w 50 -c 80 -u G
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}
define service {
host_name SERVER_NAME
service_description Process Count
check_command check_ncpa!-t 'TOKEN' -P 5693 -M processes -w 150 -c 200
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}
I tried adding this to the machine cfg file inside nagios core server:
define service {
host_name SERVER_NAME
service_description Disk Usage
check_command check_ncpa!-t 'TOKEN' -P 5693 -M disk -w 80 -c 90 -u Gi
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}
the result is an error.
https://ibb.co/1MspL7n
UNKNOWN: Unable to run check on node without check method. Requested 'disk' node.
I have nagios core 4.4.5 and ncpa 2.2.0
I followed this guide:
https://assets.nagios.com/downloads/nag ... ndows.html and installed n
then followed this guide https://assets.nagios.com/downloads/nag ... erview.pdf
added a cfg in the windows machine under C:\Program Files (x86)\Nagios\NCPA\etc\ncpa.cfg.d\ with the following lines.
[passive checks]
%HOSTNAME%|__HOST__ = system/agent_version
%HOSTNAME%|CPU Usage = cpu/percent --warning 60 --critical 80 --aggregate avg
%HOSTNAME%|Memory Usage = memory/virtual --warning 80 --critical 90 --units Gi
%HOSTNAME%|Process Count = processes --warning 300 --critical 400
%HOSTNAME%|Disk Usage = disk/logical/C:|/used_percent --warning 80 --critical 90 --units Gi
I found the check for disk usage in the example.cfg provided with ncpa2.2.0 in the windows machine.
Now I have a question:
In the guides there is no explanation on how I should define the "Disk Usage" service check in nagios core.
If I give journalctl -xe in nagios core I don't see any particular anomalies.
I can see the Cpu Usage, Memory Usage, Process Count, __HOST__ checks but I can't see the Disk Usage.
The configuration file in nagios core for the windows machine is this one:
define host {
host_name SERVER_NAME
address IP_ADDRESS
check_command check_ncpa!-t 'TOKEN' -P 5693 -M system/agent_version
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
contacts nagiosadmin
notification_interval 60
notification_period 24x7
notifications_enabled 1
icon_image ncpa.png
statusmap_image ncpa.png
register 1
}
define service {
host_name SERVER_NAME
service_description CPU Usage
check_command check_ncpa!-t 'TOKEN' -P 5693 -M cpu/percent -w 20 -c 40 -q 'aggregate=avg'
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}
define service {
host_name SERVER_NAME
service_description Memory Usage
check_command check_ncpa!-t 'TOKEN' -P 5693 -M memory/virtual -w 50 -c 80 -u G
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}
define service {
host_name SERVER_NAME
service_description Process Count
check_command check_ncpa!-t 'TOKEN' -P 5693 -M processes -w 150 -c 200
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}
I tried adding this to the machine cfg file inside nagios core server:
define service {
host_name SERVER_NAME
service_description Disk Usage
check_command check_ncpa!-t 'TOKEN' -P 5693 -M disk -w 80 -c 90 -u Gi
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
register 1
}
the result is an error.
https://ibb.co/1MspL7n
UNKNOWN: Unable to run check on node without check method. Requested 'disk' node.