Skip to content

Add subcommand info #22

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

Merged
merged 4 commits into from
Dec 11, 2021
Merged

Add subcommand info #22

merged 4 commits into from
Dec 11, 2021

Conversation

amotl
Copy link
Contributor

@amotl amotl commented Dec 11, 2021

Hi again,

this patch will add the grafana-wtf info subcommand. It will display the Grafana version and global statistics about many entities. Please let me know you if you are missing anything important. Per-entity statistics will be tackled with #18.

Data for the statistics slot is coming from Grafana's /admin/stats endpoint. Data for the summary slot is computed by grafana-wtf itself.

With kind regards,
Andreas.

/cc @jangaraj

Example

$ grafana-wtf info --format=yaml
grafana:
  version: 8.3.2
  url: http://localhost:3000
statistics:
  activeAdmins: 1
  activeEditors: 0
  activeSessions: 0
  activeUsers: 1
  activeViewers: 0
  admins: 1
  alerts: 0
  dailyActiveAdmins: 0
  dailyActiveEditors: 0
  dailyActiveSessions: 0
  dailyActiveUsers: 1
  dailyActiveViewers: 0
  dashboards: 1
  datasources: 3
  editors: 0
  monthlyActiveUsers: 1
  orgs: 1
  playlists: 0
  snapshots: 0
  stars: 0
  tags: 2
  users: 1
  viewers: 0
summary:
  annotations: 0
  dashboards: 1
  datasources: 3
  folders: 1
  notifications: 0
  organizations: 1
  snapshots: 0
  teams: 0
  users: 1
  dashboard_panels: 11
  dashboard_annotations: 1
  dashboard_templating: 5

@amotl amotl merged commit 8af7476 into main Dec 11, 2021
@amotl amotl deleted the amo/add-info branch December 11, 2021 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant