mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
112 lines
No EOL
3.8 KiB
JSON
112 lines
No EOL
3.8 KiB
JSON
{
|
|
"requirements": [
|
|
"Nagios"
|
|
],
|
|
"description": [
|
|
"The M(nagios) module has two basic functions: scheduling downtime and toggling alerts for services or hosts.",
|
|
"All actions require the C(host) parameter to be given explicitly. In playbooks you can use the C($inventory_hostname) variable to refer to the host the playbook is currently running on.",
|
|
"You can specify multiple services at once by separating them with commas, .e.g., C(services=httpd,nfs,puppet).",
|
|
"When specifying what service to handle there is a special service value, I(host), which will handle alerts/downtime for the I(host itself), e.g., C(service=host). This keyword may not be given with other services at the same time. I(Setting alerts/downtime for a host does not affect alerts/downtime for any of the services running on it.)",
|
|
"When using the M(nagios) module you will need to specify your nagios server using the C(delegate_to) parameter."
|
|
],
|
|
"author": "Tim Bielawa",
|
|
"docuri": "nagios",
|
|
"module": "nagios",
|
|
"filename": "library/nagios",
|
|
"examples": [
|
|
{
|
|
"code": "nagios action=downtime minutes=30 service=httpd host=$inventory_hostname",
|
|
"description": "set 30 minutes of apache downtime"
|
|
},
|
|
{
|
|
"code": "nagios action=downtime minutes=60 service=host host=$inventory_hostname",
|
|
"description": "schedule an hour of HOST downtime"
|
|
},
|
|
{
|
|
"code": "nagios action=downtime services=frob,foobar,qeuz host=$inventory_hostname",
|
|
"description": "schedule downtime for a few services"
|
|
},
|
|
{
|
|
"code": "nagios action=enable_alerts service=smart host=$inventory_hostname",
|
|
"description": "enable SMART disk alerts"
|
|
},
|
|
{
|
|
"code": "nagios action=disable_alerts service=httpd,nfs host=$inventory_hostname",
|
|
"description": "two services at once: disable httpd and nfs alerts"
|
|
},
|
|
{
|
|
"code": "nagios action=disable_alerts service=host host=$inventory_hostname",
|
|
"description": "disable HOST alerts"
|
|
},
|
|
{
|
|
"code": "nagios action=silence host=$inventory_hostname",
|
|
"description": "silence ALL alerts"
|
|
},
|
|
{
|
|
"code": "nagios action=unsilence host=$inventory_hostname",
|
|
"description": "unsilence all alerts"
|
|
}
|
|
],
|
|
"version_added": 0.7,
|
|
"short_description": "Perform common tasks in Nagios related to downtime and notifications.",
|
|
"now_date": "2012-10-09",
|
|
"options": {
|
|
"action": {
|
|
"default": null,
|
|
"required": true,
|
|
"description": [
|
|
"Action to take."
|
|
],
|
|
"choices": [
|
|
"downtime",
|
|
"enable_alerts",
|
|
"disable_alerts",
|
|
"silence",
|
|
"unsilence"
|
|
]
|
|
},
|
|
"host": {
|
|
"default": null,
|
|
"required": true,
|
|
"description": [
|
|
"Host to operate on in Nagios."
|
|
]
|
|
},
|
|
"author": {
|
|
"default": "Ansible",
|
|
"required": false,
|
|
"description": [
|
|
"Author to leave downtime comments as. - Only useable with the C(downtime) action."
|
|
]
|
|
},
|
|
"services": {
|
|
"default": null,
|
|
"required": true,
|
|
"description": [
|
|
"What to manage downtime/alerts for. Separate multiple services with commas.",
|
|
"C(service) is an alias for C(services).",
|
|
"B(Required) option when using the C(downtime), C(enable_alerts), and C(disable_alerts) actions."
|
|
],
|
|
"aliases": [
|
|
"service"
|
|
]
|
|
},
|
|
"minutes": {
|
|
"default": 30,
|
|
"required": false,
|
|
"description": [
|
|
"Minutes to schedule downtime for.",
|
|
"Only useable with the C(downtime) action."
|
|
]
|
|
},
|
|
"cmdfile": {
|
|
"default": "auto-detected",
|
|
"required": false,
|
|
"description": [
|
|
"Path to the nagios I(command file) (FIFO pipe).",
|
|
"Only required if auto-detection fails."
|
|
]
|
|
}
|
|
},
|
|
"ansible_version": "0.8"
|
|
} |