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

Add dependency linking to zabbix_service module

Open amartin3225 opened this issue 4 years ago • 1 comments

SUMMARY

Add support for linking dependencies to a service in zabbix. This is similar to how zabbix_host supports the link_templates parameter which allows you to link a template to a host.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

zabbix_service

ADDITIONAL INFORMATION

It would be very useful to have the zabbix_service module support linking dependencies. It looks like the Zabbix API supports this via the service.adddependencies, service.deletedependencies, and service.update methods. This would allow you to define a list of dependencies for a server in its ansible role and then update those automatically, much like how link_templates in zabbix_host works now:

- name: Manage services
  local_action:
        module: community.zabbix.zabbix_service
        server_url: "https://192.168.1.1"
        login_user: username
        login_password: password
        name: apache2 service
        sla: 99.99
        calculate_sla: yes
        algorithm: one_child
        trigger_name: apache2 service status
        trigger_host: webserver01
        state: present
        link_dependencies:
          - other service 1
          - other service 2
          - other service 3

Thank you for considering this feature!

amartin3225 avatar Feb 23 '21 20:02 amartin3225

thank you for the suggestion @amartin3225 . The requests seems reasonable and doable, although I am not sure when we would be able to address it.

If you are considering submitting a PR it would be more than welcome! :)

D3DeFi avatar Mar 13 '21 15:03 D3DeFi

API function removed https://support.zabbix.com/browse/ZBXNEXT-3022

pyrodie18 avatar May 01 '23 11:05 pyrodie18