commit fa1ae5b2e73acc31712b2763bd0a00d21f773056 Author: Rasmus Lauritsen Date: Wed Jul 24 23:47:39 2024 +0200 first commit diff --git a/data/grafana.db b/data/grafana.db new file mode 100644 index 0000000..ac4e8b5 Binary files /dev/null and b/data/grafana.db differ diff --git a/docker.env b/docker.env new file mode 100644 index 0000000..dd6a85e --- /dev/null +++ b/docker.env @@ -0,0 +1,9 @@ +# Set the admin user's login and password +GF_SECURITY_ADMIN_USER=admin +GF_SECURITY_ADMIN_PASSWORD=admin + +GF_PATHS_PROVISIONING=/etc/grafana/provisioning + + +# Enable or disable user signup +GF_USERS_ALLOW_SIGN_UP=false diff --git a/provisioning/datasources/1_graphite.yaml b/provisioning/datasources/1_graphite.yaml new file mode 100644 index 0000000..99a68c9 --- /dev/null +++ b/provisioning/datasources/1_graphite.yaml @@ -0,0 +1,75 @@ +# Configuration file version +apiVersion: 1 + +# List of data sources to delete from the database. +deleteDatasources: + - name: Graphite + orgId: 1 + +# Mark provisioned data sources for deletion if they are no longer in a provisioning file. +# It takes no effect if data sources are already listed in the deleteDatasources section. +prune: true + +# List of data sources to insert/update depending on what's +# available in the database. +datasources: + # Sets the name you use to refer to + # the data source in panels and queries. + - name: Graphite + # Sets the data source type. + type: graphite + # Sets the access mode, either + # proxy or direct (Server or Browser in the UI). + # Some data sources are incompatible with any setting + # but proxy (Server). + access: proxy + # Sets the organization id. Defaults to orgId 1. + orgId: 1 + # Sets a custom UID to reference this + # data source in other parts of the configuration. + # If not specified, Grafana generates one. + uid: my_unique_uid + # Sets the data source's URL, including the + # port. + url: http://localhost:8080 + # Sets the database user, if necessary. + user: + # Sets the database name, if necessary. + database: + # Enables basic authorization. + basicAuth: + # Sets the basic authorization username. + basicAuthUser: + # Enables credential headers. + withCredentials: + # Toggles whether the data source is pre-selected + # for new panels. You can set only one default + # data source per organization. + isDefault: + # Fields to convert to JSON and store in jsonData. + jsonData: + # Defines the Graphite service's version. + graphiteVersion: '1.1' + # Enables TLS authentication using a client + # certificate configured in secureJsonData. + tlsAuth: true + # Enables TLS authentication using a CA + # certificate. + tlsAuthWithCACert: true + # Fields to encrypt before storing in jsonData. + secureJsonData: + # Defines the CA cert, client cert, and + # client key for encrypted authentication. + tlsCACert: '...' + tlsClientCert: '...' + tlsClientKey: '...' + # Sets the database password, if necessary. + password: + # Sets the basic authorization password. + basicAuthPassword: + # Sets the version. Used to compare versions when + # updating. Ignored when creating a new data source. + version: 1 + # Allows users to edit data sources from the + # Grafana UI. + editable: false \ No newline at end of file diff --git a/provisioning/orgs/new_org.yaml b/provisioning/orgs/new_org.yaml new file mode 100644 index 0000000..343d1b4 --- /dev/null +++ b/provisioning/orgs/new_org.yaml @@ -0,0 +1,17 @@ +apiVersion: 1 + +orgs: + - name: "New Organization" + address: + address1: "123 Grafana St." + address2: "" + city: "Grafana City" + zipCode: "12345" + state: "Grafana State" + country: "Grafanistan" + preferences: + homeDashboardId: 1 + timezone: "browser" + theme: "" + homeDashboardFolderId: 0 + folderName: "" diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..6ec61cc --- /dev/null +++ b/readme.md @@ -0,0 +1,9 @@ +```bash +docker stop grafana +docker rm grafana +docker run --detach --name=grafana \ + --publish 3000:3000 \ + --env-file=docker.env \ + --volume "$PWD/data:/var/lib/grafana" \ + grafana/grafana-oss +``` \ No newline at end of file