Saltstack module grafana4 详解

grafana4.get_org

Show a single organization.

name
    Name of the organization.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.get_org <name>

grafana4.delete_user

Delete a user.

userid
    Id of the user.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.delete_user <user_id>

grafana4.update_org

Update an existing organization.

orgid
    Id of the organization.

name
    New name of the organization.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.update_org <org_id> name=<name>

grafana4.get_datasources

List all datasources in an organisation.

orgname
    Name of the organization.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.get_datasources <orgname>

grafana4.delete_user_org

Remove a user from an organization.

userid
    Id of the user.

orgid
    Id of the organization.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.delete_user_org <user_id> <org_id>

grafana4.get_users

List all users.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.get_users

grafana4.delete_dashboard

Delete a dashboard.

slug
    Slug (name) of the dashboard.

orgname
    Name of the organization.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.delete_dashboard <slug>

grafana4.get_orgs

List all organizations.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.get_orgs

grafana4.update_user_password

Update a user password.

userid
    Id of the user.

password
    New password of the user.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.update_user_password <user_id> password=<password>

grafana4.update_datasource

Update a datasource.

datasourceid
    Id of the datasource.

name
    Name of the data source.

type
    Type of the datasource (‘graphite‘, ‘influxdb‘ etc.).

access
    Use proxy or direct.

url
    The URL to the data source API.

user
    Optional - user to authenticate with the data source.

password
    Optional - password to authenticate with the data source.

database
    Optional - database to use with the data source.

basicAuth
    Optional - set to True to use HTTP basic auth to authenticate with the
    data source.

basicAuthUser
    Optional - HTTP basic auth username.

basicAuthPassword
    Optional - HTTP basic auth password.

jsonData
    Optional - additional json data to post (eg. "timeInterval").

isDefault
    Optional - set data source as default.

withCredentials
    Optional - Whether credentials such as cookies or auth headers should
    be sent with cross-site requests.

typeLogoUrl
    Optional - Logo to use for this datasource.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.update_datasource <datasourceid>

grafana4.update_user_permissions

Update a user password.

userid
    Id of the user.

isGrafanaAdmin
    Whether user is a Grafana admin.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.update_user_permissions <user_id> isGrafanaAdmin=<true|false>

grafana4.create_org_user

Add user to the organization.

loginOrEmail
    Login or email of the user.

role
    Role of the user for this organization. Should be one of:
        - Admin
        - Editor
        - Read Only Editor
        - Viewer

orgname
    Name of the organization in which users are added.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.create_org_user <orgname> loginOrEmail=<loginOrEmail> role=<role>

grafana4.update_org_address

Update the organization address.

orgname
    Name of the organization in which users are updated.

address1
    Optional - address1 of the org.

address2
    Optional - address2 of the org.

city
    Optional - city of the org.

zip_code
    Optional - zip_code of the org.

state
    Optional - state of the org.

country
    Optional - country of the org.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.update_org_address <orgname> country=<country>

grafana4.create_datasource

Create a new datasource in an organisation.

name
    Name of the data source.

type
    Type of the datasource (‘graphite‘, ‘influxdb‘ etc.).

access
    Use proxy or direct.

url
    The URL to the data source API.

user
    Optional - user to authenticate with the data source.

password
    Optional - password to authenticate with the data source.

database
    Optional - database to use with the data source.

basicAuth
    Optional - set to True to use HTTP basic auth to authenticate with the
    data source.

basicAuthUser
    Optional - HTTP basic auth username.

basicAuthPassword
    Optional - HTTP basic auth password.

jsonData
    Optional - additional json data to post (eg. "timeInterval").

isDefault
    Optional - set data source as default.

withCredentials
    Optional - Whether credentials such as cookies or auth headers should
    be sent with cross-site requests.

typeLogoUrl
    Optional - Logo to use for this datasource.

orgname
    Name of the organization in which the data source should be created.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.create_datasource

grafana4.create_update_dashboard

Create or update a dashboard.

dashboard
    A dict that defines the dashboard to create/update.

overwrite
    Whether the dashboard should be overwritten if already existing.

orgname
    Name of the organization.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.create_update_dashboard dashboard=<dashboard> overwrite=True orgname=<orgname>

grafana4.get_user

Show a single user.

login
    Login of the user.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.get_user <login>

grafana4.delete_org

Delete an organization.

orgid
    Id of the organization.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.delete_org <org_id>

grafana4.update_user

Update an existing user.

userid
    Id of the user.

login
    Optional - Login of the user.

email
    Optional - Email of the user.

name
    Optional - Full name of the user.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.update_user <user_id> login=<login> email=<email>

grafana4.update_org_user

Update user role in the organization.

userid
    Id of the user.

loginOrEmail
    Login or email of the user.

role
    Role of the user for this organization. Should be one of:
        - Admin
        - Editor
        - Read Only Editor
        - Viewer

orgname
    Name of the organization in which users are updated.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.update_org_user <user_id> <orgname> loginOrEmail=<loginOrEmail> role=<role>

grafana4.create_org

Create a new organization.

name
    Name of the organization.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.create_org <name>

grafana4.switch_org

Switch the current organization.

name
    Name of the organization to switch to.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.switch_org <name>

grafana4.get_org_users

Get the list of users that belong to the organization.

orgname
    Name of the organization.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.get_org_users <orgname>

grafana4.get_user_data

Get user data.

userid
    Id of the user.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.get_user_data <user_id>

grafana4.get_org_prefs

Get the organization preferences.

orgname
    Name of the organization in which users are updated.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.get_org_prefs <orgname>

grafana4.delete_org_user

Remove user from the organization.

userid
    Id of the user.

orgname
    Name of the organization in which users are updated.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.delete_org_user <user_id> <orgname>

grafana4.get_user_orgs

Get the list of organisations a user belong to.

userid
    Id of the user.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.get_user_orgs <user_id>

grafana4.get_datasource

Show a single datasource in an organisation.

name
    Name of the datasource.

orgname
    Name of the organization.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.get_datasource <name> <orgname>

grafana4.get_org_address

Get the organization address.

orgname
    Name of the organization in which users are updated.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.get_org_address <orgname>

grafana4.delete_datasource

Delete a datasource.

datasourceid
    Id of the datasource.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.delete_datasource <datasource_id>

grafana4.create_user

Create a new user.

login
    Login of the new user.

password
    Password of the new user.

email
    Email of the new user.

name
    Optional - Full name of the new user.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.create_user login=<login> password=<password> email=<email>

grafana4.get_dashboard

Get a dashboard.

slug
    Slug (name) of the dashboard.

orgname
    Name of the organization.

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.get_dashboard <slug>

grafana4.update_org_prefs

Update the organization preferences.

orgname
    Name of the organization in which users are updated.

theme
    Selected theme for the org.

homeDashboardId
    Home dashboard for the org.

timezone
    Timezone for the org (one of: "browser", "utc", or "").

profile
    Configuration profile used to connect to the Grafana instance.
    Default is ‘grafana‘.

CLI Example:

    salt ‘*‘ grafana4.update_org_prefs <orgname> theme=<theme> timezone=<timezone>

原文地址:https://www.cnblogs.com/randomlee/p/Saltstack_module_grafana4.html

时间: 2024-08-30 15:12:29

Saltstack module grafana4 详解的相关文章

Saltstack module highstate_doc 详解

highstate_doc.read_file output the contents of a file: this is a workaround if the cp.push module does not work. https://github.com/saltstack/salt/issues/37133 help the master output the contents of a document that might be saved on the minions files

Saltstack module artifactory 详解

artifactory.get_latest_snapshot Gets latest snapshot of the given artifact artifactory_url URL of artifactory instance repository Snapshot repository in artifactory to retrieve artifact from, for example: libs-snapshots group_id Group Id of the artif

Saltstack module introspect 详解

introspect.service_highstate Return running and enabled services in a highstate structure. By default also returns package dependencies for those services, which means that package definitions must be created outside this function. To drop the packag

Saltstack module inspector 详解

inspector.query Query the node for specific information. Parameters: * **scope**: Specify scope of the query. * **System**: Return system data. * **Software**: Return software information. * **Services**: Return known services. * **Identity**: Return

Saltstack module http 详解

http.query New in version 2015.5.0 Query a resource, and decode the return data Passes through all the parameters described in the :py:func:`utils.http.query function <salt.utils.http.query>`: .. autofunction:: salt.utils.http.query raise_error : Tr

Saltstack module ini 详解

ini.remove_option Remove a key/value pair from a section in an ini file. Returns the value of the removed key, or ``None`` if nothing was removed. API Example: import salt sc = salt.client.get_local_client() sc.cmd('target', 'ini.remove_option', [pat

Saltstack module glassfish 详解

glassfish.update_connector_c_pool Update a connection pool glassfish.update_jdbc_resource Update a JDBC resource glassfish.enum_connector_resource Enum connection resources glassfish.delete_jdbc_resource Delete a JDBC resource glassfish.enum_connecto

Saltstack module iosconfig 详解

iosconfig.diff_text Return the diff, as text, between the candidate and the running config. candidate_config The candidate configuration sent as text. This argument is ignored when ``candidate_path`` is set. candidate_path Absolute or remote path fro

Saltstack module genesis 详解

genesis.mksls Convert an installation file/script to an SLS file. Currently supports ``kickstart``, ``preseed``, and ``autoyast``. CLI Examples: salt <minion> genesis.mksls kickstart /path/to/kickstart.cfg salt <minion> genesis.mksls kickstart