The charm doesn't support Graylog 4 API and fails to provision Nagios user

Bug #1973636 reported by Nikolay Vinogradov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Graylog Charm
New
Undecided
Unassigned

Bug 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 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

Revision history for this message
Nikolay Vinogradov (nikolay.vinogradov) wrote :
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
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.