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

Add Module to Update Host Events #1238

Merged
merged 7 commits into from
May 29, 2024

Conversation

aplathrop
Copy link
Contributor

SUMMARY

Add module that leverages the event.acknowledge API method

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME
  • zabbix_host_events_update
ADDITIONAL INFORMATION

I wanted to be able to update events using the API, but the module did not exist, so I created it. It works well with the zabbix_host_events_info module, one can use that to get events for a host and then take the output from that module to update the event

- name: get events for host
  community.zabbix.zabbix_host_events_info:
    host_identifier: ExampleHost
    host_id_type: hostname
    trigger_severity: warning
  register: zabbix_host_events

- name: acknowledge event
  community.zabbix.zabbix_host_events_update:
    params:
      eventids: "{{ zabbix_host_events.triggers_problem[0].last_event.eventid }}"
      action: ack
      msg: "event acknowledged"

Copy link

codecov bot commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.59%. Comparing base (0a689a5) to head (42f9e4b).
Report is 39 commits behind head on main.

Current head 42f9e4b differs from pull request most recent head 00a669e

Please upload reports for the commit 00a669e to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1238      +/-   ##
==========================================
- Coverage   79.57%   77.59%   -1.99%     
==========================================
  Files          35       36       +1     
  Lines        4435     4458      +23     
  Branches     1166     1165       -1     
==========================================
- Hits         3529     3459      -70     
- Misses        535      621      +86     
- Partials      371      378       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aplathrop aplathrop marked this pull request as ready for review May 28, 2024 20:40
@pyrodie18
Copy link
Collaborator

Nice work and thanks for the addition

@pyrodie18 pyrodie18 merged commit 7278802 into ansible-collections:main May 29, 2024
26 checks passed
@aplathrop aplathrop deleted the host_events_update branch May 29, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants