dell / ansible-powerscale

PowerScale (Isilon) Ansible modules
GNU General Public License v3.0
29 stars 21 forks source link

[FEATURE]:Add support for alert channel and alert rule management #97

Closed nikolisg7 closed 3 weeks ago

nikolisg7 commented 3 months ago

Describe the solution you'd like Module/Modules for event channel and alert rules management; effectively the functionality handled by API endpoints

Describe alternatives you've considered Direct API calls with the urimodule, but it helps only with creation. Modfications are difficult, idempotency too

Additional context Add any other context or screenshots about the feature request here.

anupamaloke commented 3 months ago

@nikolisg7, this support has been added as part of #92. Please take a look and let us know whether that PR addresses all of your requirements or not.

nikolisg7 commented 3 months ago

@anupamaloke, thanks for the hint! If I understand the change correctly, the info module now returns current settings on alert rules and alert channels. This is indeed one good point. What we would be interested in in addition to information gathering, would be the possibility to create and modify alert rules and alert channels. Is this on the roadmap? I would imagine something like the following:

- name: Foo
  dellemc.powerscale.event:
        onefs_host: "{{ ansible_host }}"
        port_no: "{{ powerscale_port }}"
        api_user: "{{ ps_admin }}"
        api_password: "{{ ps_admin_passwd }}"
        verify_ssl: "{{ verify_ssl }}"
        state: present
        endpoint: alert-conditions
        data: "{{ item }}"
  with_items: "{{ alert_conditions }}"

where the items in the list var alert_conditions can be defined at inventory level and be made to look like the json payloads of an API POST query, e.g.:

    - name: Isilon Admins RESOLVED
      channels:
          - isilon-admins
      condition: Resolved
      interval: 0
      limit: 0
      categories:
          - SYS_DISK_EVENTS
          - NODE_STATUS_EVENTS
          - REBOOT_EVENTS
          - SW_EVENTS
          - QUOTA_EVENTS
          - SNAP_EVENTS
          - WINNET_EVENTS
          - FILESYS_EVENTS
          - HW_EVENTS

Similar for the endpoint channels. Would that make sense? Thanks!

anupamaloke commented 3 months ago

@nikolisg7, thank you for sharing the details. This is great. We are working on adding these features in the next releases starting with the dellemc.powerscale.info module and dellemc.powerscale.alert_settings in v3.2.0 (releasing in a week's time) as part of the overall support for alerts and events.

sachin-apa commented 1 month ago

@nikolisg7 We have now added a support for alert_rule #106 and alert_channel #107. Please take a look at it and let us know if its good to close the request.

nikolisg7 commented 1 month ago

@sachin-apa fantastic! Just redone the tasks using the alert_channel and alert_rule; works fine. Thanks! You can of course close the request

anupamaloke commented 3 weeks ago

Closed by #92 #106 and #107.