Module for working with the Grafana v4 API
New in version 2017.7.0.
depends: |
requests |
---|---|
configuration: |
This module requires a configuration profile to be configured in the minion config, minion pillar, or master config. The module will use the 'grafana' key by default, if defined. For example: grafana:
grafana_url: http://grafana.localhost
grafana_user: admin
grafana_password: admin
grafana_timeout: 3
|
Create a new datasource in an organisation.
CLI Example:
salt '*' grafana4.create_datasource
Create a new organization.
CLI Example:
salt '*' grafana4.create_org <name>
Add user to the organization.
CLI Example:
salt '*' grafana4.create_org_user <orgname> loginOrEmail=<loginOrEmail> role=<role>
Create or update a dashboard.
CLI Example:
salt '*' grafana4.create_update_dashboard dashboard=<dashboard> overwrite=True orgname=<orgname>
Create a new user.
CLI Example:
salt '*' grafana4.create_user login=<login> password=<password> email=<email>
Delete a dashboard.
CLI Example:
salt '*' grafana4.delete_dashboard <slug>
Delete a datasource.
CLI Example:
salt '*' grafana4.delete_datasource <datasource_id>
Delete an organization.
CLI Example:
salt '*' grafana4.delete_org <org_id>
Remove user from the organization.
CLI Example:
salt '*' grafana4.delete_org_user <user_id> <orgname>
Delete a user.
CLI Example:
salt '*' grafana4.delete_user <user_id>
Remove a user from an organization.
CLI Example:
salt '*' grafana4.delete_user_org <user_id> <org_id>
Get a dashboard.
CLI Example:
salt '*' grafana4.get_dashboard <slug>
Show a single datasource in an organisation.
CLI Example:
salt '*' grafana4.get_datasource <name> <orgname>
List all datasources in an organisation.
CLI Example:
salt '*' grafana4.get_datasources <orgname>
Show a single organization.
CLI Example:
salt '*' grafana4.get_org <name>
Get the organization address.
CLI Example:
salt '*' grafana4.get_org_address <orgname>
Get the organization preferences.
CLI Example:
salt '*' grafana4.get_org_prefs <orgname>
Get the list of users that belong to the organization.
CLI Example:
salt '*' grafana4.get_org_users <orgname>
List all organizations.
CLI Example:
salt '*' grafana4.get_orgs
Show a single user.
CLI Example:
salt '*' grafana4.get_user <login>
Get user data.
CLI Example:
salt '*' grafana4.get_user_data <user_id>
Get the list of organisations a user belong to.
CLI Example:
salt '*' grafana4.get_user_orgs <user_id>
List all users.
CLI Example:
salt '*' grafana4.get_users
Switch the current organization.
CLI Example:
salt '*' grafana4.switch_org <name>
Update a datasource.
CLI Example:
salt '*' grafana4.update_datasource <datasourceid>
Update an existing organization.
CLI Example:
salt '*' grafana4.update_org <org_id> name=<name>
Update the organization address.
CLI Example:
salt '*' grafana4.update_org_address <orgname> country=<country>
Update the organization preferences.
CLI Example:
salt '*' grafana4.update_org_prefs <orgname> theme=<theme> timezone=<timezone>
Update user role in the organization.
CLI Example:
salt '*' grafana4.update_org_user <user_id> <orgname> loginOrEmail=<loginOrEmail> role=<role>
Update an existing user.
CLI Example:
salt '*' grafana4.update_user <user_id> login=<login> email=<email>
Update a user password.
CLI Example:
salt '*' grafana4.update_user_password <user_id> password=<password>
Update a user password.
CLI Example:
salt '*' grafana4.update_user_permissions <user_id> isGrafanaAdmin=<true|false>
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.grafana4.html