Hello,
We are curently using Nagios for monitoring Iaas VM's in Azure. But these VM's aren't 24/7 powered on (for saving money) and on specific times when there are exams in our university these VM's are powered on.
That means that we want to disable the host and service checks when the VM in Azure is powered off. I cannot find similar use cases on the Nagios Support forum or a plugin on https://exchange.nagios.org. .
Do you have any idea or solution for this use case?
Thank you in advance,
Kind Regards,
Fabiuseur
Nagios monitor hosts in Azure disable Nagios checks when powered off
-
gwesterman
- Posts: 268
- Joined: Wed Aug 23, 2023 11:29 am
Re: Nagios monitor hosts in Azure disable Nagios checks when powered off
Hi @fabiuseur,
It looks like you're looking for the Scheduled Downtime feature in XI. This allows you to disable unwanted host, service, hostgroup, and servicegroup checks for a specified amount of time. Here are some links to get started:
- Configuring Downtime in Nagios
- Support KB Article on Configuring Downtime
Let us know if this works!
It looks like you're looking for the Scheduled Downtime feature in XI. This allows you to disable unwanted host, service, hostgroup, and servicegroup checks for a specified amount of time. Here are some links to get started:
- Configuring Downtime in Nagios
- Support KB Article on Configuring Downtime
Let us know if this works!
-
robvandenbos
- Posts: 3
- Joined: Mon Jan 27, 2014 4:16 am
Re: Nagios monitor hosts in Azure disable Nagios checks when powered off
I don't think Secheduled Downtime would be very helpful in our situation, since there is no fixed schedule when exams will take place and examservers needs to be running in Azure.
This is how it works: When there is an exam, support staff run a powershell script to spin up the required servers in Azure. When the exam is over, another powershell script shuts down the servers. Staff members who run these scripts are unaware of Nagios.
But our Azure engineers would like to now how these servers in Azure are behaiving, once they are running. They are interested in things like CPU and memory usage for example.
So what we are looking for is a mechanism, being included in the powershell scripts for example, which enables the Nagios checks when servers in Azure are started and disablea the Nagios checks once the servers are shut down.
This is how it works: When there is an exam, support staff run a powershell script to spin up the required servers in Azure. When the exam is over, another powershell script shuts down the servers. Staff members who run these scripts are unaware of Nagios.
But our Azure engineers would like to now how these servers in Azure are behaiving, once they are running. They are interested in things like CPU and memory usage for example.
So what we are looking for is a mechanism, being included in the powershell scripts for example, which enables the Nagios checks when servers in Azure are started and disablea the Nagios checks once the servers are shut down.
-
gwesterman
- Posts: 268
- Joined: Wed Aug 23, 2023 11:29 am
Re: Nagios monitor hosts in Azure disable Nagios checks when powered off
I see. For your situation, I think you will have to configure your script to modify the main config file (nagios.cfg) to disable appropriate checks and restart and/or leverage the External Commands functionality in Nagios. These let external applications submit combats via writing to the command file (nagios.cmd) which are processed by Nagios.
Hope this helps!
Hope this helps!
Re: Nagios monitor hosts in Azure disable Nagios checks when powered off
You may create a custom solution with just fall Nagios XI's capabilities and some scripting to cover the use case of turning off host and service checks for virtual machines (VMs) in Azure that aren't constantly switched on. The core concept is to turn on the host and service checks dynamically when the virtual machines (VMs) are switched on, and turn them on when the VMs are operating.