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

Open nikolisg7 opened 1 month ago

nikolisg7 commented 1 month 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 1 month 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 1 month 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 1 month 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.