E501 fixes (#22879)

This commit is contained in:
Matt Martz
2017-03-22 20:50:28 -05:00
committed by GitHub
parent 4fdeade389
commit 3164e8b561
215 changed files with 1328 additions and 761 deletions

View File

@@ -65,7 +65,9 @@ options:
description: ["The name of the alert."]
required: true
message:
description: ["A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username' notation as events. Monitor message template variables can be accessed by using double square brackets, i.e '[[' and ']]'."]
description:
- A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same
'@username' notation as events. Monitor message template variables can be accessed by using double square brackets, i.e '[[' and ']]'.
required: false
default: null
silenced:
@@ -77,7 +79,9 @@ options:
required: false
default: False
no_data_timeframe:
description: ["The number of minutes before a monitor will notify when data stops reporting. Must be at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks."]
description:
- The number of minutes before a monitor will notify when data stops reporting. Must be at least 2x the monitor timeframe for metric
alerts or 2 minutes for service checks.
required: false
default: 2x timeframe for metric, 2 minutes for service
timeout_h:
@@ -85,11 +89,15 @@ options:
required: false
default: null
renotify_interval:
description: ["The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved."]
description:
- The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's
not resolved.
required: false
default: null
escalation_message:
description: ["A message to include with a re-notification. Supports the '@username' notification we allow elsewhere. Not applicable if renotify_interval is None"]
description:
- A message to include with a re-notification. Supports the '@username' notification we allow elsewhere. Not applicable if renotify_interval
is None
required: false
default: null
notify_audit:
@@ -97,7 +105,9 @@ options:
required: false
default: False
thresholds:
description: ["A dictionary of thresholds by status. This option is only available for service checks and metric alerts. Because each of them can have multiple thresholds, we don't define them directly in the query."]
description:
- A dictionary of thresholds by status. This option is only available for service checks and metric alerts. Because each of them can have
multiple thresholds, we don't define them directly in the query."]
required: false
default: {'ok': 1, 'critical': 1, 'warning': 1}
locked:
@@ -106,7 +116,9 @@ options:
default: False
version_added: "2.2"
require_full_window:
description: ["A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to False for sparse metrics, otherwise some evaluations will be skipped."]
description:
- A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to False for
sparse metrics, otherwise some evaluations will be skipped.
required: false
default: null
version_added: "2.3"

View File

@@ -50,10 +50,14 @@ options:
description:
- The type of LogicMonitor object you wish to manage.
- "Collector: Perform actions on a LogicMonitor collector."
- NOTE You should use Ansible service modules such as M(service) or M(supervisorctl) for managing the Collector 'logicmonitor-agent' and 'logicmonitor-watchdog' services. Specifically, you'll probably want to start these services after a Collector add and stop these services before a Collector remove.
- NOTE You should use Ansible service modules such as M(service) or M(supervisorctl) for managing the Collector 'logicmonitor-agent' and
'logicmonitor-watchdog' services. Specifically, you'll probably want to start these services after a Collector add and stop these services
before a Collector remove.
- "Host: Perform actions on a host device."
- "Hostgroup: Perform actions on a LogicMonitor host group."
- 'NOTE Host and Hostgroup tasks should always be performed via delegate_to: localhost. There are no benefits to running these tasks on the remote host and doing so will typically cause problems.'
- >
NOTE Host and Hostgroup tasks should always be performed via delegate_to: localhost. There are no benefits to running these tasks on the
remote host and doing so will typically cause problems.
required: true
default: null
choices: ['collector', 'host', 'datsource', 'hostgroup']
@@ -86,7 +90,8 @@ options:
description:
- The fully qualified domain name of a collector in your LogicMonitor account.
- This is required for the creation of a LogicMonitor host (target=host action=add).
- This is required for updating, removing or scheduling downtime for hosts if 'displayname' isn't specified (target=host action=update action=remove action=sdt).
- This is required for updating, removing or scheduling downtime for hosts if 'displayname' isn't
specified (target=host action=update action=remove action=sdt).
required: false
default: null
hostname:

View File

@@ -26,9 +26,13 @@ module: nagios
short_description: Perform common tasks in Nagios related to downtime and notifications.
description:
- "The C(nagios) module has two basic functions: scheduling downtime and toggling alerts for services or hosts."
- All actions require the I(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.
- All actions require the I(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.) To schedule downtime for all services on particular host use keyword "all", e.g., C(service=all).
- 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.) To schedule downtime for all
services on particular host use keyword "all", e.g., C(service=all).
- When using the C(nagios) module you will need to specify your Nagios server using the C(delegate_to) parameter.
version_added: "0.7"
options:

View File

@@ -56,15 +56,20 @@ options:
required: true
desc:
description:
- For C(triggered) I(state) - Required. Short description of the problem that led to this trigger. This field (or a truncated version) will be used when generating phone calls, SMS messages and alert emails. It will also appear on the incidents tables in the PagerDuty UI. The maximum length is 1024 characters.
- For C(triggered) I(state) - Required. Short description of the problem that led to this trigger. This field (or a truncated version)
will be used when generating phone calls, SMS messages and alert emails. It will also appear on the incidents tables in the PagerDuty UI.
The maximum length is 1024 characters.
- For C(acknowledged) or C(resolved) I(state) - Text that will appear in the incident's log associated with this event.
required: false
default: Created via Ansible
incident_key:
description:
- Identifies the incident to which this I(state) should be applied.
- For C(triggered) I(state) - If there's no open (i.e. unresolved) incident with this key, a new one will be created. If there's already an open incident with a matching key, this event will be appended to that incident's log. The event key provides an easy way to "de-dup" problem reports.
- For C(acknowledged) or C(resolved) I(state) - This should be the incident_key you received back when the incident was first opened by a trigger event. Acknowledge events referencing resolved or nonexistent incidents will be discarded.
- For C(triggered) I(state) - If there's no open (i.e. unresolved) incident with this key, a new one will be created. If there's already an
open incident with a matching key, this event will be appended to that incident's log. The event key provides an easy way to "de-dup"
problem reports.
- For C(acknowledged) or C(resolved) I(state) - This should be the incident_key you received back when the incident was first opened by a
trigger event. Acknowledge events referencing resolved or nonexistent incidents will be discarded.
required: false
client:
description:

View File

@@ -75,7 +75,9 @@ options:
- If the screen(s) already been added, the screen(s) name won't be updated.
- When creating or updating screen(s), C(screen_name), C(host_group) are required.
- When deleting screen(s), the C(screen_name) is required.
- 'The available states are: C(present) (default) and C(absent). If the screen(s) already exists, and the state is not C(absent), the screen(s) will just be updated as needed.'
- >
The available states are: C(present) (default) and C(absent). If the screen(s) already exists, and the state is not C(absent), the screen(s)
will just be updated as needed.
required: true
notes:
- Too many concurrent updates to the same screen may cause Zabbix to return errors, see examples for a workaround if needed.
@@ -423,7 +425,8 @@ def main():
changed_screens.append(screen_name)
if created_screens and changed_screens:
module.exit_json(changed=True, result="Successfully created screen(s): %s, and updated screen(s): %s" % (",".join(created_screens), ",".join(changed_screens)))
module.exit_json(changed=True, result="Successfully created screen(s): %s, and updated screen(s): %s" % (",".join(created_screens),
",".join(changed_screens)))
elif created_screens:
module.exit_json(changed=True, result="Successfully created screen(s): %s" % ",".join(created_screens))
elif changed_screens: