-
[ Issue ] Not able to send device-virtual metrics data to Influx db ! [ Description ]
I have included environment variables, but I don't see device virtual sending any metrics. device-virtual configurations: (full configurations provided in the attached .yml file) device-virtual:
...
...
environment:
EDGEX_SECURITY_SECRET_STORE: "false"
SERVICE_HOST: edgex-device-virtual
WRITABLE_TELEMETRY_INTERVAL: "3s"
WRITABLE_TELEMETRY_METRICS_EVENTSSENT: "true"
WRITABLE_TELEMETRY_METRICS_READINGSSSENT: "true"
WRITABLE_LOGLEVEL: TRACE
hostname: edgex-device-virtual
image: edgexfoundry/device-virtual:3.1.1
... device-virtual logs: edgex-device-virtual | level=INFO ts=2024-08-05T14:05:06.678514465Z app=device-virtual source=messaging.go:104 msg="Connected to redis Message Bus @ redis://edgex-redis:6379 with AuthMode='usernamepassword'"
# Publish 0 metrics to the 'edgex/telemetry/device-virtual
edgex-device-virtual | level=DEBUG ts=2024-08-05T14:05:36.6855458Z app=device-virtual source=reporter.go:195 msg="Publish 0 metrics to the 'edgex/telemetry/device-virtual' base topic" According to me, if I'm able to send metric data to app-metrics-influx then I would be sending data to Influx db. Please help on this !Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
please use the /api/v3/config to confirm the environment variable setting takes effect. |
Beta Was this translation helpful? Give feedback.
-
used /api/v3/config for device-virtual and the values were not set: "Telemetry": {
"Interval": "30s",
"Metrics": {
"EventsSent": false,
"LastConnected": false,
"ReadingsSent": false,
"SecurityConsulTokenDuration": false,
"SecurityConsulTokensRequested": false,
"SecurityGetSecretDuration": false,
"SecurityRuntimeSecretTokenDuration": false,
"SecuritySecretsRequested": false,
"SecuritySecretsStored": false
},
"Tags": null
}
}
},
"serviceName": "device-virtual"
} So I added overwrite and cp & config provider for device-virtual in the compose file: device-virtual:
command:
- cp
- --overwrite
container_name: edgex-device-virtual
depends_on:
consul:
condition: service_started
required: true
core-data:
condition: service_started
required: true
core-metadata:
condition: service_started
required: true
environment:
EDGEX_SECURITY_SECRET_STORE: "false"
SERVICE_HOST: edgex-device-virtual
WRITABLE_TELEMETRY_INTERVAL: "5s"
WRITABLE_TELEMETRY_METRICS_EVENTSSENT: "true"
WRITABLE_TELEMETRY_METRICS_READINGSSSENT: "true"
WRITABLE_LOGLEVEL: TRACE
EDGEX_CONFIG_PROVIDER: consul.http://edgex-core-consul:8500 When used /api/v3/config again the values are not set and there is no metrics published. edgex-device-virtual | level=DEBUG ts=2024-08-06T10:39:36.031538196Z app=device-virtual source=reporter.go:195 msg="Publish 0 metrics to the 'edgex/telemetry/device-virtual' base topic" I'm I missing anything ? |
Beta Was this translation helpful? Give feedback.
it looks like -o won't publish the environment variables override.
can it work if you directly modify the config from Consul?