Skip to content
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

show_problems #62

Open
farwarx opened this issue Dec 14, 2017 · 2 comments
Open

show_problems #62

farwarx opened this issue Dec 14, 2017 · 2 comments

Comments

@farwarx
Copy link

farwarx commented Dec 14, 2017

Hi,
It'll be unbelievable to add the command "show_problems" to export in CSV the list of problems of a period :)

Thanks a lot!
Cheerz :P

@rafaelma
Copy link
Contributor

Hello

What about using 'show_alarms'. e.g. This example gives you all alarms with the word 'disk' and the last event unacknowledged.

[rafael@host ~]$ zabbix-cli -o csv -C "show_alarms *disk* '' * true"

TriggerID,Host,Description,Severity,Last change,Age
"947927","example1.uio.no","* The disk / has used more than 95% of total diskspace (Free: 4.87 %)","AVERAGE","2017-12-14 15:56:40","0:15:06.723073"
"582400","example2.uio.no","* The disk / has used more than 95% of total diskspace (Free: 4.91 %)","AVERAGE","2017-12-14 13:48:53","2:22:53.723874"
"970749","example3.uio.no","* The disk C: has less than 5% (2.07 GB) free space","AVERAGE","2017-12-14 10:34:32","5:37:14.724031"

You can used multiple filters but not timestamps filters. More information:
https://github.com/usit-gd/zabbix-cli/blob/master/docs/manual.rst#show-alarms

@farwarx
Copy link
Author

farwarx commented Dec 15, 2017

Hi,
Thanks for you reply.
The show_alarm, show only alarms in progress, not the solved.
I want to export all problems (in progress and solved), for hostgroups on a selected period to generate KPI.
I find in the API, the event.get who permit to get the eventids and the clock. And if there is an r_eventids, i redo the request with this r_eventids to have the clock of the end of the problem. But i need to script in python, and i'm not a specialist :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants