“Machine Utilization Example” - Dashboards with role based access permission¶
In this file, data is pushed into the InfluxDB and two dashboards with different viewing permissions has been configured.
Download: utilization-grafana.yml
Note
The example below uses an additional Docker image provided by Cybus that requires a suitable license. You can check the current capabilities and permissions of your Connectware license in the Cybus Portal (https://portal.cybus.io). If your license is not eligible to use the example Docker image, please contact Cybus Sales (sales@cybus.io).
1description: >
2 The generic Grafana Service
3
4metadata:
5 name: Generic Grafana Dashboard
6 icon: https://www.cybus.io/wp-content/uploads/2017/10/for-whom3.svg
7 provider: cybus
8 homepage: https://www.cybus.io
9 version: 1.2.1
10
11definitions:
12 SID: !ref Cybus::ServiceId
13 CYBUS_MQTT_ROOT: 'services'
14
15resources:
16
17 #----------------------------------------------------------------------------
18 # VOLUMES
19 #----------------------------------------------------------------------------
20
21 grafanaVolume:
22 type: Cybus::Volume
23
24 influxdbVolume:
25 type: Cybus::Volume
26
27 #----------------------------------------------------------------------------
28 # FRONTENDS
29 #----------------------------------------------------------------------------
30
31 # Grafana
32 grafanaURL:
33 type: Cybus::IngressRoute
34 properties:
35 container: !ref genericGrafana
36 type: http
37 slug: grafana
38 target:
39 path: '/'
40 port: 3000
41
42 dashboard:
43 type: Cybus::Link
44 properties:
45 name: Dashboard
46 ingressRoute: !ref grafanaURL
47 href: ''
48
49 #----------------------------------------------------------------------------
50 # Cybus Timeseris & Dashboard service containers
51 #----------------------------------------------------------------------------
52
53 influxdbPush:
54 type: Cybus::Container
55 properties:
56 image: registry.cybus.io/cybus-services/influxdb-push:0.0.3
57 environment:
58 MQTT_HOST: !ref Cybus::MqttHost
59 MQTT_USER: !ref Cybus::MqttUser
60 MQTT_PORT: !ref Cybus::MqttPort
61 MQTT_PASS: !ref Cybus::MqttPassword
62 MQTT_ROOT_TOPIC: !sub "services/#"
63 INFLUX_HOST: !ref influxdb
64 INFLUX_PORT: 8086
65 INFLUX_DB: generic
66 HTTP_ROOT: /
67
68 influxdb:
69 type: Cybus::Container
70 properties:
71 image: registry.cybus.io/cybus-services/influxdb:1.7.7-alpine
72 ports:
73 - 8086:8086/tcp
74 volumes:
75 - !sub "${influxdbVolume}:/var/lib/influxdb"
76 environment:
77 INFLUXDB_DB: generic
78
79 genericGrafana:
80 type: Cybus::Container
81 properties:
82 image: registry.cybus.io/cybus-services/generic-grafana:1.2.1
83 volumes:
84 - !sub "${grafanaVolume}:/var/lib/grafana"
85 environment:
86 GF_SERVER_ROOT_URL: !sub "/services/${SID}/grafana"
87 GF_AUTH_ANONYMOUS_ENABLED: true
88 INFLUX_DB: generic
89 INFLUX_HOST: !ref influxdb
90 INFLUX_PORT: 8086