Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1855544

Summary: metrics role should automate the setup of Grafana datasources
Product: Red Hat Enterprise Linux 8 Reporter: Nathan Scott <nathans>
Component: rhel-system-rolesAssignee: Pavel Cahyna <pcahyna>
Status: CLOSED ERRATA QA Contact: Jan Kurik <jkurik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: agerstmayr, djez, jkurik, mcermak, nathans, rmeggins
Target Milestone: rcKeywords: Bugfix, Rebase
Target Release: 8.3Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: role:metrics
Fixed In Version: rhel-system-roles-1.0-16.el8 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 04:03:45 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:

Description Nathan Scott 2020-07-10 06:30:08 UTC
In https://github.com/linux-system-roles/metrics/issues/11 several problems are described relating to the Grafana support in the metrics role.  In particular, the grafana-server daemon was not started correctly.  Also datasources we have installed and made available to support base (pcp) functionality enabled by the metrics role are not enabled.

This situation is resolved by this commit upstream...

commit 6ea8aa8e212e92558559780eda0382410baeb5cb
Author: Nathan Scott <nathans>
Date:   Tue Jun 30 14:40:59 2020 +1000

    Add Grafana provisioning logic for the PCP datasources
    
    Relates to https://github.com/linux-system-roles/metrics/issues/11

Comment 3 Jan Kurik 2020-08-17 14:19:27 UTC
The current implementation only configures datasources on Grafana side.
PCP counterpart is not included in the rhel-system-roles-1.0-16.el8 build.

Specifically installation of pcp-pmda-bcc and pcp-pmda-bpftrace is missing. The installation of pcp-pmda-bpftrace PMDA will also need some changes in the default configuration to work.
Without these packages and the configuration changes the "PCP bpftrace" datasource in Grafana does not work.

Comment 6 Nathan Scott 2020-08-18 02:31:30 UTC
(In reply to Jan Kurik from comment #3)
> The current implementation only configures datasources on Grafana side.
> PCP counterpart is not included in the rhel-system-roles-1.0-16.el8 build.
> 
> Specifically installation of pcp-pmda-bcc and pcp-pmda-bpftrace is missing.

It is not mandatory for these PMDAs to be installed on the localhost -
the datasource can use a remote collector system.

> The installation of pcp-pmda-bpftrace PMDA will also need some changes in
> the default configuration to work.
> Without these packages and the configuration changes the "PCP bpftrace"
> datasource in Grafana does not work.

That's 8.4 functionality - for 8.3 we're looking at a smaller set of needs
- which does not include setting up authentication for bpftrace and simple
installation of those optional PMDAs mentioned.

Just having a grafana-server setup and with the PCP datasources actually
present is our initial goal here.

| Without these packages and the configuration changes the "PCP bpftrace" datasource in Grafana does not work.

It can be used with a (suitably configured) remote host - and a user may
choose to enable optional PMDAs (like bpftrace) locally too, outside of
the metrics role, in which case we want all datasources available.

There was insufficient time in 8.3 to implement all of the features PCP
provides - plan is to tackle optional-authentication in 8.4 timeframe.

Comment 8 Jan Kurik 2020-08-18 05:04:41 UTC
(In reply to Nathan Scott from comment #6)
> There was insufficient time in 8.3 to implement all of the features PCP
> provides - plan is to tackle optional-authentication in 8.4 timeframe.

Thanks Nathan for the explanation.
As such, I am switching this bug to VERIFIED and will wait for the 8.4 :)

Comment 11 errata-xmlrpc 2020-11-04 04:03:45 UTC
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 (rhel-system-roles bug fix and enhancement update), 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/RHEA-2020:4809