Bug 1989816
| Summary: | Sensubility log file is empty. Logs are not being written to the sensubility.log | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Leonid Natapov <lnatapov> |
| Component: | collectd-sensubility | Assignee: | Martin Magr <mmagr> |
| Status: | CLOSED ERRATA | QA Contact: | Leonid Natapov <lnatapov> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 16.1 (Train) | CC: | csibbitt, lmadsen |
| Target Milestone: | z3 | Keywords: | Triaged, ZStream |
| Target Release: | 16.2 (Train on RHEL 8.4) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | collectd-sensubility-0.1.9-1.el8ost | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-06-22 16:02:30 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
IThe problem is not that log would not be written at all as can be seen here:
-rw-r--r--. 1 42409 42409 3857344 Sep 9 21:11 /var/log/containers/collectd/sensubility.log
[root@controller-0 ~]# podman exec -it collectd tail -1 /var/log/collectd/sensubility.log
[WARN] Sent message was not ACKed [message: Message{content-type: application/json, body: {"labels":{"check":"check-container-health","client":"controller-0.redhat.local","
severity":"OKAY"},"annotations":{"command":"/scripts/collectd_check_health.py","duration":0.0459454,"executed":1631221934,"issued":1631221934,"output":"[]\n","status":0,"ve
s":"{\"commonEventHeader\":{\"domain\":\"heartbeat\",\"eventType\":\"checkResult\",\"eventId\":\"controller-0.redhat.local-check-container-health\",\"priority\":\"Normal\",
\"reportingEntityId\":\"a736da19-f166-41ce-9450-9d1147a01d1b\",\"reportingEntityName\":\"controller-0.redhat.local\",\"sourceId\":\"a736da19-f166-41ce-9450-9d1147a01d1b\",\
"sourceName\":\"controller-0.redhat.local-collectd-sensubility\",\"startingEpochMicrosec\":1631221934,\"lastEpochMicrosec\":1631221934},\"heartbeatFields\":{\"additionalFie
lds\":{\"check\":\"check-container-health\",\"command\":\"/scripts/collectd_check_health.py\",\"duration\":\"0.045945\",\"executed\":\"1631221934\",\"issued\":\"1631221934\
",\"output\":\"[]\\n\",\"status\":\"0\"}}}"},"startsAt":"2021-09-09T21:12:14Z"}}, ack: {released <nil> <nil>}]
[root@controller-0 ~]
The problem is that log_level and log_file values from configuration files are currently being ignored. So sensubility log_level will always be WARNING because that is a default value unless --debug or --verbose or --silent flags will be used. And since tripleo is not using any of that flag, the level is currently hardcoded.
PR: https://github.com/infrawatch/collectd-sensubility/pull/11
Fixed. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Release of components for Red Hat OpenStack Platform 16.2.3 (Train)), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:4793 |
Sensubility log file is empty. Logs are not being written to the sensubility.log After deploying OSP with enabled collectd-sensubility, a sensubility.log file remain empty. log level set to DEBUG. After checking sensubility conf it appears that log file path is not present there ()[root@ctrl-0-16-1 etc]# cat collectd-sensubility.conf [default] log_level=DEBUG [sensu] keepalive_interval=20 tmp_base_dir=/var/tmp/collectd-sensubility-checks shell_path=/usr/bin/sh worker_count=2 checks={"check-container-health":{"command":"/scripts/collectd_check_health.py","handlers":[],"interval":10,"occurrences":3,"refresh":90,"standalone":true}} [amqp1] connection=amqp://172.17.1.120:5666 results_channel=sensubility/osp161-telemetry client_name=ctrl-0-16-1.internalapi.redhat.local results_format=smartgateway ()[root@ctrl-0-16-1 etc]# ------ snippet from the STF template: CollectdEnableSensubility: true CollectdSensubilityLogLevel: DEBUG CollectdSensubilityResultsChannel: sensubility/osp161-telemetry CollectdSensubilityTransport: amqp1