-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enh (storage::purestorage::flasharray::v2::restapi::plugin) : Add the flag attribute to the alert filter #5307
base: develop
Are you sure you want to change the base?
Conversation
Hello :) Thank you for your contribution :) 🙏 |
Hello, The entire output is big, I just add an interesting snippet, you tell me if it's not enough. A command and result example :
The alert from the debug output :
Regards, |
Hi @Fabien-Bernard, Could you provide us the whole PS: take care of sensitive data this output may contain. |
Hello, You right, here another example :
{"continuation_token":null,"items":
[
{"created":1737462338078,"state":"open","description":"(drive:ch0.nvb1): failure Expected: healthy, Actual: failed","component_type":"drive","name":"81204734","id":"55764d164ea24e6fb60bfbf44a030815","code":60,"category":"array","severity":"critical","flagged":false,"updated":1738059644723,"closed":null,"notified":null,"component_name":"ch0.nvb1","expected":"healthy","actual":"failed","knowledge_base_url":"https://support.purestorage.com/?cid=Alert_0060","summary":"(drive:ch0.nvb1): failure","issue":"failure"},
{"created":1737464651017,"state":"open","description":"(shelf:ch0): shelf drive failures(s) Expected: 0, Actual: 1","component_type":"shelf","name":"81204806","id":"f8231727fefb4496aa87cfab0e809929","code":60,"category":"array","severity":"critical","flagged":true,"updated":1738059644699,"closed":null,"notified":null,"component_name":"ch0","expected":"0","actual":"1","knowledge_base_url":"https://support.purestorage.com/?cid=Alert_0060","summary":"(shelf:ch0): shelf drive failures(s)","issue":"shelf drive failures(s)"}
],
"more_items_remaining":false,"total_item_count":null}
Hope it helps. |
Thanks! |
Community contributors
Description
Plugin : storage::purestorage::flasharray::v2::restapi::plugin
Mode : storage::purestorage::flasharray::v2::restapi::mode::alerts
At the moment, it is possible to filter alerts by : category, code, severity, opened, state, component_name, issue.
The goal of this pull request is to be able to also filter the alerts by the flag attribute.
Fixes # (issue)
Non applicable.
Type of change
How this pull request can be tested ?
For example :
To avoid alerts, of severity "warning" which have been manualy unflagged, to be catch by the service, modify the default value of the warning-status by adding the flag filter :
--warning-status='%{state} ne "closed" and %{severity} =~ /warning/i and %{flagged}'
Checklist