Maybe I'm not understanding the logic. I create a cfg file with hosts and services. Do I not need to include hosts and addresses? Is it just a cfg file and then check services statement?
I'm just used to creating a host file and adding services to it. This is a concept I haven't setup before. Can you please clarify for me.
ClusterGroup Confusion
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: ClusterGroup Confusion
you wuld create a host/service like this
Obviously replacing APIA-A and APIA-B and "DNS Service" in the check_command to match the actual host and service name of the hosts and services in the cluster
Code: Select all
define host {
host_name CLUSTERHOST
use generic-host
address CLUSTERHOST
register 1
}
define service {
host_name CLUSTERHOST
service_description SERVICENAME
use genericnet-service
check_command check_service_cluster!"DNS Cluster"!1!1!$SERVICESTATEID:APIA-A:DNS Service$,$SERVICESTATEID:APIA-B:DNS Service$,$SERVICESTATEID:APIA-B:DNS Service$
register 1
}
-
- Posts: 72
- Joined: Wed Feb 06, 2019 3:22 pm
Re: ClusterGroup Confusion
I created the cfg file with my settings but I am receiving a critical message.
define host {
host_name APIA-Servers
use generic-host
address APIA-Servers
register 1
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
contact_groups admins
notification_interval 60
notification_period 24x7
notifications_enabled 1
icon_image ncpa.png
statusmap_image ncpa.png
}
define service {
host_name APIA-Servers
service_description Name Event Processor [Prod]
use generic-service
check_command check_service_cluster!"Name Event Processor [Prod]"!1!1!$SERVICESTATEID:APIA-1:"Name Event Processor [Prod]"$,$SERVICESTATEID:APIA-2:"Name Event Processor [Prod]"$
register 1
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contact_groups admins
}
Current Status: CRITICAL (for 0d 0h 2m 22s)
Status Information: CLUSTER CRITICAL: Name Event Processor [Prod]: 0 ok, 0 warning, 2 unknown, 0 critical
Performance Data:
Current Attempt: 5/5 (HARD state)
Last Check Time: 07-19-2019 13:02:18
Check Type: ACTIVE
Check Latency / Duration: 0.000 / 0.001 seconds
Next Scheduled Check: 07-19-2019 13:07:18
Last State Change: 07-19-2019 13:02:18
Last Notification: N/A (notification 0)
Is This Service Flapping? NO (6.25% state change)
In Scheduled Downtime? NO
Last Update: 07-19-2019 13:04:33 ( 0d 0h 0m 7s ago)
define host {
host_name APIA-Servers
use generic-host
address APIA-Servers
register 1
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
contact_groups admins
notification_interval 60
notification_period 24x7
notifications_enabled 1
icon_image ncpa.png
statusmap_image ncpa.png
}
define service {
host_name APIA-Servers
service_description Name Event Processor [Prod]
use generic-service
check_command check_service_cluster!"Name Event Processor [Prod]"!1!1!$SERVICESTATEID:APIA-1:"Name Event Processor [Prod]"$,$SERVICESTATEID:APIA-2:"Name Event Processor [Prod]"$
register 1
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contact_groups admins
}
Current Status: CRITICAL (for 0d 0h 2m 22s)
Status Information: CLUSTER CRITICAL: Name Event Processor [Prod]: 0 ok, 0 warning, 2 unknown, 0 critical
Performance Data:
Current Attempt: 5/5 (HARD state)
Last Check Time: 07-19-2019 13:02:18
Check Type: ACTIVE
Check Latency / Duration: 0.000 / 0.001 seconds
Next Scheduled Check: 07-19-2019 13:07:18
Last State Change: 07-19-2019 13:02:18
Last Notification: N/A (notification 0)
Is This Service Flapping? NO (6.25% state change)
In Scheduled Downtime? NO
Last Update: 07-19-2019 13:04:33 ( 0d 0h 0m 7s ago)
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: ClusterGroup Confusion
You should not have " in here inside of the macros
Replace with
Code: Select all
define service {
check_command check_service_cluster!"Name Event Processor [Prod]"!1!1!$SERVICESTATEID:APIA-1:"Name Event Processor [Prod]"$,$SERVICESTATEID:APIA-2:"Name Event Processor [Prod]"$
}
Code: Select all
check_command check_service_cluster!"Name Event Processor [Prod]"!1!1!$SERVICESTATEID:APIA-1:Name Event Processor [Prod]$,$SERVICESTATEID:APIA-2:Name Event Processor [Prod]$
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: ClusterGroup Confusion
Also, what is the current state of host / service?
APIA-1 / Name Event Processor [Prod]
is APIA-1 the actual full hostname?
APIA-1 / Name Event Processor [Prod]
is APIA-1 the actual full hostname?
-
- Posts: 72
- Joined: Wed Feb 06, 2019 3:22 pm
Re: ClusterGroup Confusion
Scott, thank you for your assistance. That was the issue. I appreciate you walking me through this concept from beginning to end. This ticket is completed.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: ClusterGroup Confusion
Great!nickanderson1982 wrote:Scott, thank you for your assistance. That was the issue. I appreciate you walking me through this concept from beginning to end. This ticket is completed.
Locking