Closed spliakos closed 2 years ago
Hi @spliakos, looks like you're on the right track.
Next steps to make it work:
According to the specified configuration and logs, it should work.
Hi @rozetko, Unfortunately I didn't manage to make it work. I get this persistent "Error while saving analytic Unit. Datasource is not set. If it's Grafana-test-datasource then it's not supported" as you can see in the updated screenshot I have attached.
According to issue https://github.com/hastic/hastic-grafana-app/issues/445, Hastic doesn't work in Grafana 7.2.x+, we need to look into it
Closing as a duplicate of https://github.com/hastic/hastic-grafana-app/issues/462
I have the following configuration. Running hastic 0.5.0 and grafana app 0.5.0. Grafana version is 7.2.0 (In the screenshot you can see 7.1.3 but it's the same with 7.2.0.
Configuration in K8s is as follows: ` $ kctl describe pods infra-hastic-5cd86fdccd-cq55z
Name: infra-hastic-5cd86fdccd-cq55z Namespace: default Priority: 0 Node: ip-172-31-95-63.eu-west-1.compute.internal/172.31.95.63 Start Time: Mon, 02 Nov 2020 14:33:51 +0100 Labels: appName=hastic pod-template-hash=5cd86fdccd version=0.5.0 Annotations: kubectl.kubernetes.io/restartedAt: 2020-09-29T15:24:07+02:00 kubernetes.io/psp: restricted seccomp.security.alpha.kubernetes.io/pod: runtime/default Status: Running IP: ---- IPs: IP: ---- Controlled By: ReplicaSet/infra-hastic-5cd86fdccd Containers: hastics: Container ID: docker://51ae9e3e29455e37cb53e68e8f9ba6cd7770dea28770a4ceb829dcd9fd8fd612 Image: hastic/server:0.5.0 Image ID: docker-pullable://hastic/server@sha256:5c2cdbb10ee761169836a2cc3dde0fe39478838aa0b009d327b490cff423cb98 Port: 8000/TCP Host Port: 0/TCP State: Running Started: Mon, 02 Nov 2020 14:33:54 +0100 Ready: True Restart Count: 0 Environment: ZMQ_CONNECTION_STRING: tcp://hastic:8002 GRAFANA_URL: http://infra-grafana HASTIC_PORT: 8000 HASTIC_API_KEY: <set to the key 'hastic-api_key' in secret 'infra-grafana'> Optional: false Mounts: /var/run/secrets/kubernetes.io/serviceaccount from default-token-jb2hw (ro) /var/www/data from hastics-volume (rw) hastica: Container ID: docker://191608f6e99897cbfe5e979f0a49010fcd33951e17f58032fee90430d5b9a477 Image: hastic/analytics Image ID: docker-pullable://hastic/analytics@sha256:50d166d53dd0e90890a42a303f1fea35cf9c3d3172ff548683a8b9c438666bc4 Port: 8002/TCP Host Port: 0/TCP State: Running Started: Mon, 02 Nov 2020 14:33:55 +0100 Ready: True Restart Count: 0 Environment:
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-jb2hw (ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
hastics-volume:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: hastics-pvc
ReadOnly: false
default-token-jb2hw:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-jb2hw
Optional: false
QoS Class: BestEffort
Node-Selectors:
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
Normal Scheduled 25s default-scheduler Successfully assigned default/infra-hastic-5cd86fdccd-cq55z to ip-172-31-95-63.eu-west-1.compute.internal Normal Pulling 23s kubelet Pulling image "hastic/server:0.5.0" Normal Pulled 22s kubelet Successfully pulled image "hastic/server:0.5.0" Normal Created 22s kubelet Created container hastics Normal Started 22s kubelet Started container hastics Normal Pulling 22s kubelet Pulling image "hastic/analytics" Normal Pulled 21s kubelet Successfully pulled image "hastic/analytics" Normal Created 21s kubelet Created container hastica Normal Started 21s kubelet Started container hastica ` So, as you can see in the screenshot, I'm trying to add an analytic unit, and when I'm pushing Create button, the error is "Error while saving analytic unit. Datasource is not set. If it's Grafana-test-datasource' then it's not supported. This is strange, since when I add the Hastic DS in Datasources in Grafana, it looks like it's working, it returns that it's connected to the Datasource, and Hastic info is returned anyway as you can observe in the screenshot.
Is this a bug? Could it be something i'm not doing right? This is the logs section from the hastic server: kctl logs -f infra-hastic-5cd86fdccd-lqrwz hastics
HASTIC_IN_MEMORY_PERSISTANCE: false HASTIC_DB_CONNECTION_TYPE: nedb HASTIC_DB_CONNECTION_STRING: hastic:password@mongodb:27017/hastic HASTIC_PORT: 8000 HASTIC_API_KEY: --- GRAFANA_URL: http://infra-grafana Removing the slash at the end of GRAFANA_URL ORG_ID: 1 HASTIC_ALERT_TYPE: webhook HASTIC_ALERT_IMAGE: false HASTIC_WEBHOOK_URL: null HASTIC_TIMEZONE_OFFSET: null HASTIC_ALERTMANAGER_URL: null HASTIC_SERVER_URL: ws://localhost:8002 HASTIC_INSTANCE_NAME: infra-hastic-5cd86fdccd-lqrwz Creating websocket server ... ws://localhost:8002 Server is running on :8000 starting data puller with [] analytic units data puller started Got new analytic connection Start analytics pinger... Analytics pinger started Analytics is up HASTIC_WEBHOOK_URL is not set, skip sending notification: Analytics is up