community.zabbix icon indicating copy to clipboard operation
community.zabbix copied to clipboard

Add Modules for items, triggers, discoveryrules, item prototypes, and trigger prototypes to project

Open aplathrop opened this issue 1 year ago • 2 comments

SUMMARY

Added modules for items, triggers, discovery rules, item prototypes, and trigger prototypes that leverages the item, trigger, discovery rule, itemprototype, and triggerprototype API methods (get, create, update, delete)

Note the discovery rules that this PR implements are the LLD rules, not the network discovery rules (which are already implemented)

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME
  • zabbix_item
  • zabbix_trigger
  • zabbix_discoveryrule
  • zabbix_itemprototype
  • zabbix_triggerprototype
ADDITIONAL INFORMATION

I wanted to be able to add items and triggers, along with their prototype counterparts to hosts using the API, but the modules did not exist, so I created them. They also can be added to templates rather than hosts.

aplathrop avatar May 08 '24 12:05 aplathrop

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 75.67%. Comparing base (0a689a5) to head (30f4bde). Report is 24 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1222      +/-   ##
==========================================
- Coverage   79.57%   75.67%   -3.90%     
==========================================
  Files          35       41       +6     
  Lines        4435     5171     +736     
  Branches     1166     1315     +149     
==========================================
+ Hits         3529     3913     +384     
- Misses        535      797     +262     
- Partials      371      461      +90     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 12 '24 15:05 codecov[bot]

Please check your linting but other than that, it looks good.

pyrodie18 avatar May 12 '24 20:05 pyrodie18

@pyrodie18 Thanks. I think I fixed the issues the linting found, can you give the workflow another run when you get a chance?

aplathrop avatar May 13 '24 18:05 aplathrop

Great work and thank you for the addition.

pyrodie18 avatar May 14 '24 12:05 pyrodie18

@pyrodie18 No problem, thanks for merging

aplathrop avatar May 14 '24 12:05 aplathrop