Commit graph

288 commits

Author SHA1 Message Date
t.goto
f46e193718 change host.delete() parameter for newer ZBX api.
As of Zabbix API 2.4, host.delete() will not takes parameter with
`hostid` property but only the array of it.
https://www.zabbix.com/documentation/2.2/manual/api/reference/host/delete

fix #1800
2016-03-15 16:12:56 +09:00
Brian Coca
083383a2c7 Merge pull request #1753 from eikef/issue1616
Fixes #1616, check whether interface-list exits before querying its length
2016-03-03 18:48:45 -05:00
Brian Coca
904b5938a0 Merge pull request #706 from eikef/devel
return as unchanged if macro update is unnecessary
2016-03-03 18:37:42 -05:00
Brian Coca
cb291d3f82 Merge pull request #1618 from plldp/devel
Update zabbix_host.py
2016-03-01 00:15:05 -05:00
Eike Frost
6acc369377 Check whether interface-list exits before querying its length 2016-02-28 20:12:01 +00:00
Eike Frost
47466242a3 Add explicit argument_spec types to avoid misinterpretation and subsequent errors (i.e. getting an int instead of the expected str) 2016-02-28 19:35:17 +00:00
Eike Frost
2a750bb8db return as unchanged if macro update is unnecessary 2016-02-25 01:52:34 +01:00
Ronny
7d79dff1d2 Update zabbix_host.py
Use existing proxy when updating a host unless proxy is specified. Before change proxy was always set to none(0) when updating.
2016-02-05 13:33:50 +01:00
Brian Coca
5b61c75fa5 added missing verison_added 2016-02-01 23:56:58 -05:00
Mstislav Bobakov
c4aa5ee024 Add custom parameter for a sensu_check. revert newline 2016-01-28 15:44:57 +03:00
Mstislav Bobakov
6ef3697c52 Add custom parameter for a sensu_check. Fixes.
JSON replaced within dict.
Added more docs.
2016-01-28 15:42:09 +03:00
Mstislav Bobakov
8e35db0e38 Add custom parameter for a sensu_check 2016-01-21 13:08:25 +03:00
Brian Coca
3aa2d3744d Merge pull request #1482 from ansible/json-imports-fallback
Update for modules which import json.
2016-01-12 10:00:37 -05:00
Brian Coca
520d245ae7 added note on choice version availability 2016-01-11 19:06:44 -05:00
Brian Coca
4ca07d511e Merge pull request #1248 from hypergig/devel
support for event alert monitors
2016-01-11 19:01:36 -05:00
Toshio Kuratomi
d6af6f8477 Update for modules which import json.
Some do not use the json module directly so don't need import json.
Some needed to fallback to simplejson with no traceback if neither was installed

Fixes #1298
2016-01-11 13:06:22 -08:00
Michael Scherer
2f3dc1352f Replace choices=BOOLEANS by type='bool', fix #1326 2015-12-21 23:39:20 +01:00
Brian Coca
a6ceec998d corrected version_added for new monit timeout opt 2015-12-14 21:47:26 -05:00
Brian Coca
91df684902 Merge pull request #806 from gaqzi/monit/retry-option
monit: Add retry for pending/initializing services
2015-12-14 21:42:56 -05:00
Bruce Pennypacker
5abd7deab0 Remove extraneous space from end of command string in nagios_cmd 2015-12-11 16:06:33 +00:00
Michael Weber
fba8c9f8a7 Fix error 'fail_json() takes exactly 1 argument'
Fixes bug #1257
2015-12-01 01:56:23 -08:00
Björn Andersson
72155d40a3 monit: Set a high timeout waiting for status changes
Instead of waiting for up to a certain number of retries we set a high
timeout and only re-check every five seconds. Certain services can
take a minute or more to start and we want to avoid waisting resources
by polling too often.
2015-11-29 23:44:58 +08:00
Björn Andersson
262f2e9048 monit: Add version_added and type for new argument 2015-11-29 22:21:38 +08:00
Björn Andersson
5835d06a4e monit: Wait for pending state changes for reloads
@mpeters reported that we're not checking that the named service is
actually there after a reload. And that sometimes monit doesn't actually
return anything at all after a reload.
2015-11-29 22:21:38 +08:00
Björn Andersson + SU Sheng Loong
f8fe5a2fcd monit: Add retry for pending/initializing services
If there are already ongoing actions for a process managed by monit, the
module would exit unsuccessfully. It could also give off false positives
because it did not determine whether the service was started/stopped
when it was in a pending state. Which might be turning the service off,
but the action was to start it.

For example "Running - pending stop" would be regarded as the service
running and "state=enabled" would do nothing.

This will make Ansible wait for the state to finalize, or a timeout decided
by the new `max_retries` option, before it decides what to do.

This fixes issue #244.
2015-11-29 22:21:38 +08:00
Jordan Cohen
20d6e3daaf support for event alert monitors 2015-11-16 06:31:14 -05:00
Brian Coca
875a055103 corrected choices which was meant to be type 2015-11-15 14:31:34 -08:00
Ritesh Khadgaray
5e103d604a allows user to not update zabbix host config if host is present. 2015-11-09 20:21:28 +05:30
Kerim Satirli
2ac53bf559 fixes a typo in Datadog Monitor docs 2015-11-06 11:02:51 +01:00
Konstantin Manna
97b7a7a7f8 bugfix: use correct function close calls 2015-09-30 10:13:12 -04:00
Brian Coca
6cd7399a71 minor docfix 2015-09-22 21:02:49 -04:00
Brian Coca
076ddc5266 Merge pull request #1002 from knakayama/bugfix/fix-argument-type-for-zabbix_screen
Fix argument type for zabbix_screen
2015-09-22 21:00:07 -04:00
Brian Coca
c7c32ef86f minor doc fixes nagios 2015-09-22 13:58:36 -04:00
Brian Coca
5017c4483a Merge pull request #798 from vaupelt/patch-1
strange results with services=all

agreed, the doc issues are unrelated to this PR, will fix those independently
2015-09-22 13:49:46 -04:00
knakayama
45f4568753 Fix argument type for zabbix_screen 2015-09-20 18:18:58 +09:00
Anders Ingemann
e0f513a903 Fix state & metric description
Also: add state=absent to last example
2015-09-17 12:12:54 +02:00
Anders Ingemann
9342c16e78 Add github ID to author field in sensu_check
As proposed by @gregdek in #983
2015-09-17 12:04:04 +02:00
Darren Worrall
b0926125c2 Fix json loading in sensu_check
Fixes `AttributeError: 'str' object has no attribute 'read'` when the
check path exists
2015-09-15 16:43:26 +01:00
Darren Worrall
4ead053031 Initialise stream variable
Fixes `UnboundLocalError: local variable 'stream' referenced before
assignment` when the check path doesnt exist
2015-09-15 16:40:01 +01:00
Tim Bielawa
c9785a6948 Fix capitalization in nagios 'services' parameter comment 2015-08-31 13:14:05 -04:00
Amanpreet Singh
a0af060c25 Make pagerduty_alert module more inline with ansible modules
- use state parameter instead of event_type
- add support for check mode
2015-08-27 18:05:46 +05:30
Amanpreet Singh
0847bfecd6 Add new module: pagerduty_alert
- trigger, acknowledge or resolve pagerduty incidents
2015-08-27 18:00:17 +05:30
vaupelt
150d3ce0ee strange results with services=all
I issued a command with action=disable_alerts host=webserver services=all set and get this results:

    "nagios_commands": [
        "[1438593631] DISABLE_SVC_NOTIFICATIONS;webserver;a", 
        "[1438593631] DISABLE_SVC_NOTIFICATIONS;webserver;l", 
        "[1438593631] DISABLE_SVC_NOTIFICATIONS;webserver;l"
    ]

This is not a big deal because i have just overlooked the action=silence command. Nevertheless a more predictable result would be a nice thing to have.
2015-08-03 12:38:16 +02:00
Brian Coca
27bf193483 added missing license headers
fixes #508
2015-07-30 14:48:59 -04:00
Toshio Kuratomi
aa1b4caa8a Merge pull request #734 from ansible/fetch_url-uptimerobot
Port uptimerobot to fetch_url
2015-07-28 11:21:08 -07:00
Toshio Kuratomi
4a43f52437 Use fetch_url's basic auth instead of code specific to this module 2015-07-28 10:51:13 -07:00
Toshio Kuratomi
8aa490c638 Port uptimerobot to fetch_url 2015-07-20 23:22:33 -07:00
Toshio Kuratomi
626977f90e Port librarto_annotation from urllib2 to fetch_url 2015-07-20 23:09:59 -07:00
Toshio Kuratomi
79173ac18d Clean up unneeded urllib2 imports 2015-07-20 23:04:27 -07:00
Greg DeKoenigsberg
d640fd95e9 Merge pull request #605 from bpennypacker/pagerduty_updates
monitoring/pagerduty module improvements, including specifying multiple services, fixing task output, adding 'delete'' action
2015-07-04 15:40:23 -04:00