8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
I tried to use the csv output option which is listed in the documentation: https://unioslo.github.io/zabbix-cli/guide/configuration/#appoutput which returned the error ValueError: Unknown output format <OutputFormat.CSV: 'csv'>.
ValueError: Unknown output format <OutputFormat.CSV: 'csv'>.
It seems that this has not yet been implemented, as it is listed as TODO in render.py:
zabbix-cli/zabbix_cli/output/render.py
Line 71 in 89a4eac
The text was updated successfully, but these errors were encountered:
I came up with a workaround for this using jq with the show_hosts command to generate a CSV of hosts from Zabbix.
First set format = "json" under [app.output] in zabbix-cli.toml:
zabbix-cli.toml
[app.output] format = "json" color = true paging = false
zabbix-cli show_hosts | jq -r \ '(["hostid", "host", "groups", "templates", "zabbix_agent", "maintenance_status", "status", "proxy_name"] | @csv), ( .result[] | [.hostid, .host, (.groups | map(.name) | join("; ")), (.templates | map(.name) | join("; ")), .zabbix_agent, .maintenance_status, .status, (.proxy.name // "")] | @csv)' \ >> output.csv
Sorry, something went wrong.
Here's the same thing but for alarms:
zabbix-cli show_alarms | jq -r \ '(["triggerid", "host", "description", "severity", "lastchange", "age"] | @csv), ( .result[] | [.triggerid, .hostname, .description, .severity, .lastchange, .age] | @csv)' \ >> output.csv
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
I tried to use the csv output option which is listed in the documentation: https://unioslo.github.io/zabbix-cli/guide/configuration/#appoutput which returned the error
ValueError: Unknown output format <OutputFormat.CSV: 'csv'>.
It seems that this has not yet been implemented, as it is listed as TODO in render.py:
zabbix-cli/zabbix_cli/output/render.py
Line 71 in 89a4eac
The text was updated successfully, but these errors were encountered: