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

Request: Implement item module

Open ljvdhooft opened this issue 1 year ago • 2 comments

SUMMARY

Just like the commands to create a host, being able to create an item for the host.

COMPONENT NAME

community.zabbix.zabbix_item

ADDITIONAL INFORMATION

Use it to create items on a host to make provisioning easier. Right now this could be done via the HTTP API but it's pretty complicated since there are no checks if the items already exists, so the tasksfile gets quite big.


- community.zabbix.zabbix_item:
  item_name: item1
  host_name: parent_host
  state: present
  type: http_agent
  url: "google.com"
  preprocessing: [
  { -- add some params -- }
  ]
  

ljvdhooft avatar Apr 11 '24 12:04 ljvdhooft

proof of concept: https://github.com/ljvdhooft/community.zabbix/commit/4e584a5e9ae2997ab4e54bf160ad2aca69e5ee73

A lot of parameters are missing, but the basics are working.

ljvdhooft avatar Apr 15 '24 14:04 ljvdhooft

With the other parameters and documentation added: https://github.com/ljvdhooft/community.zabbix/commit/046ed956f7d4157b96c89ecf390330026ee66a9d

Still examples need to be made and will begin on integration tests

ljvdhooft avatar Apr 18 '24 13:04 ljvdhooft

This was implemented in #1222

pyrodie18 avatar May 16 '24 03:05 pyrodie18