Activity log for bug #1973636

Date Who What changed Old value New value Message
2022-05-16 19:26:19 Nikolay Vinogradov bug added bug
2022-05-16 19:27:17 Nikolay Vinogradov attachment added Screenshot from 2022-05-16 22-22-13.png https://bugs.launchpad.net/charm-graylog/+bug/1973636/+attachment/5590147/+files/Screenshot%20from%202022-05-16%2022-22-13.png
2022-05-24 10:21:39 Nikolay Vinogradov summary charm doesn't support Graylog 4 API and fails to provision Nagios user The charm doesn't support Graylog 4 API and fails to provision Nagios user
2022-05-24 10:22:09 Nikolay Vinogradov description Hi all, Graylog charm can integrate with nrpe charm via nrpe-external-master relation to allow Nagios monitoring of Graylog installation. However in Graylog 4 (snap channel=4/stable) starting from this commit: [1], also mentioned in this change log item: [2] (since Graylog 4.1.0) "token" property has been removed from GET user tokens API output by replacement the REST objects with TokenSummary object, in order to show the token string only once when it is created for security reasons. The current version of the charm however still tries to parse token string from that REST resource output: [3] In addition to that, in Graylog 4 using 'admin' as the username will fail as illustrated in the attached screenshot. The RESTful resource there expects user's UUID which is 'local:admin' for the built-in administrator and an UUID value for any other user. The charm is not aware of that: [4] Workaround: Create "nagios" user manually or using Graylog API, create a token for the user manually and then provide all that input to the charm using leader-set: $ juju run -a graylog leader-set nagios_token=<nagios_token_value> Optionally run update-status to force status update: $ juju run -u graylog/0 hooks/update-status [1] https://github.com/Graylog2/graylog2-server/commit/ac15175dfdce72826e2c0870185a60943c911b70 [2] https://docs.graylog.org/docs/changelog#graylog-410 [3] https://git.launchpad.net/charm-graylog/tree/src/lib/charms/layer/graylog/api.py#n115 [4] https://git.launchpad.net/charm-graylog/tree/src/lib/charms/layer/graylog/api.py#n109 Hi all, Graylog charm can integrate with nrpe charm via nrpe-external-master relation to allow Nagios monitoring of Graylog installation. However in Graylog 4 (snap channel=4/stable) starting from this commit: [1], also mentioned in this change log item: [2] (since Graylog 4.1.0) "token" property has been removed from GET user tokens API output by replacement the REST objects with TokenSummary object, in order to show the token string only once when it is created for security reasons. The current version of the charm however still tries to parse token string from that REST resource output: [3] In addition to that, in Graylog 4 using 'admin' as the username will fail as illustrated in the attached screenshot. The RESTful resource there expects user's UUID which is 'local:admin' for the built-in administrator and an UUID value for any other user. The charm is not aware of that: [4] Workaround: Create "nagios" user with the password expected by the charm (check leader settings) manually or using Graylog API, create a token for the user manually and then provide all that input to the charm using leader-set: $ juju run -a graylog leader-set nagios_token=<nagios_token_value> Optionally run update-status to force status update: $ juju run -u graylog/0 hooks/update-status [1] https://github.com/Graylog2/graylog2-server/commit/ac15175dfdce72826e2c0870185a60943c911b70 [2] https://docs.graylog.org/docs/changelog#graylog-410 [3] https://git.launchpad.net/charm-graylog/tree/src/lib/charms/layer/graylog/api.py#n115 [4] https://git.launchpad.net/charm-graylog/tree/src/lib/charms/layer/graylog/api.py#n109