Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added "start" argument to the Nagios module so that one can specify w… #55652

Open
wants to merge 2 commits into
base: devel
from

Conversation

Projects
None yet
2 participants
@dramaley
Copy link
Contributor

commented Apr 23, 2019

…hen downtime should start. It defaults to "now", which preserves existing behavior of the module.

SUMMARY

A "start" attribute has been added to the scheduling functions so that one can provide a start time for scheduled downtime. Like Nagios itself, the time is specified in time_t format. If no time is specified, it defaults to the current time, which is how the module always behaved before.

The specific reason I needed this feature is at my organization we do updates on a monthly cycle. We use Ansible to run updates on Linux servers and schedule their reboots during the official maintenance window. Scheduling downtime in Nagios is difficult without the ability to specify a start time that coincides with the reboot. I had been working on a role that would have scheduled outages directly without using the Nagios module, but extending the module to support a start time seemed a much cleaner approach. I hope others find this change useful too.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

nagios.py

ADDITIONAL INFORMATION

The Nagios module had no way to specify when downtime was supposed to start, only a duration. Now it supports both, with the start time optional (it defaults to the current time).

Daniel A. Ramaley
Added "start" argument to the Nagios module so that one can specify w…
…hen downtime should start. It defaults to "now", which preserves existing behavior of the module.
@ansibot

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.