Skip to content

Commit

Permalink
Fixes #36818 - Monitoring Guide
Browse files Browse the repository at this point in the history
Co-authored-by: Maximilian Kolb <kolb@atix.de>
  • Loading branch information
evgeni and maximiliankolb committed Oct 10, 2023
1 parent 1f88d8e commit 439aea7
Show file tree
Hide file tree
Showing 29 changed files with 236 additions and 284 deletions.
1 change: 1 addition & 0 deletions guides/common/attributes-titles.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
:ManagingHostsDocTitle: Managing Hosts
:ManagingOrganizationsLocationsDocTitle: Managing Organizations and Locations in {ProjectName}
:ManagingSecurityDocTitle: Managing Security Compliance
:MonitoringDocTitle: Monitoring {ProjectName}
:PlanningDocTitle: Planning for {ProjectName}
:ProvisioningDocTitle: Provisioning Hosts
:QuickstartDocTitle: Quickstart Guide for {Project} on {install-on-os}
Expand Down
2 changes: 1 addition & 1 deletion guides/doc-Monitoring_Project/docinfo.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<title>Monitoring Red Hat Satellite</title>
<productname>Red Hat Satellite</productname>
<productnumber>6.9</productnumber>
<productnumber>6.14</productnumber>
<subtitle>Collecting metrics from Red Hat Satellite 6</subtitle>
<abstract>
<para>This guide describes how to gather metrics from Red Hat Satellite 6 for analysis. It is aimed at Satellite administrators.</para>
Expand Down
Binary file modified guides/doc-Monitoring_Project/images/grafana_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
39 changes: 32 additions & 7 deletions guides/doc-Monitoring_Project/master.adoc
Original file line number Diff line number Diff line change
@@ -1,24 +1,49 @@
include::common/attributes.adoc[]
include::common/header.adoc[]
= Monitoring {ProjectName}
= {MonitoringDocTitle}
:monitoring-project:
:context: monitoring-guide
:context: monitoring

ifdef::satellite[]
include::common/modules/proc_providing-feedback-on-red-hat-documentation.adoc[leveloffset=+1]
endif::[]

include::topics/con_metrics-overview.adoc[leveloffset=+1]

include::topics/con_project_metrics_overview.adoc[leveloffset=+1]
include::topics/con_performance-co-pilot.adoc[leveloffset=+1]

include::topics/con_performance-metrics-domain-agents.adoc[leveloffset=+2]

include::topics/proc_installing-pcp-packages.adoc[leveloffset=+1]

include::topics/proc_configuring-pcp-data-collection.adoc[leveloffset=+2]
include::topics/proc_enabling-access-to-metrics-via-web-ui.adoc[leveloffset=+2]

ifndef::foreman-deb[]
include::topics/proc_enabling-access-to-telemery-data-using-the-web-ui.adoc[leveloffset=+2]
endif::[]

include::topics/proc_verifying-pcp-configuration.adoc[leveloffset=+2]

include::topics/con_pcp-metrics.adoc[leveloffset=+1]

include::topics/proc_identifying-available-metrics.adoc[leveloffset=+2]

include::topics/con_retrieving-metrics.adoc[leveloffset=+1]
include::topics/con_retrieving-metrics-using-cli.adoc[leveloffset=+2]

include::topics/con_retrieving-metrics-using-the-cli.adoc[leveloffset=+2]

include::topics/proc_retrieving-live-metrics-using-cli.adoc[leveloffset=+3]

include::topics/proc_retrieving-archived-metrics-using-cli.adoc[leveloffset=+3]
include::topics/proc_retrieving-metrics-via-web-ui.adoc[leveloffset=+2]
include::topics/con_metrics-storage.adoc[leveloffset=+1]

ifndef::foreman-deb[]
include::topics/proc_retrieving-metrics-in-the-web-ui.adoc[leveloffset=+2]
endif::[]

include::topics/con_metrics-data-retention.adoc[leveloffset=+1]

include::topics/proc_changing-default-logging-interval.adoc[leveloffset=+2]

include::topics/proc_changing-data-retention-policy.adoc[leveloffset=+2]

include::topics/proc_confirming-data-storage-usage.adoc[leveloffset=+2]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[id='metrics-data-retention_{context}']
= Metrics Data Retention

The storage capacity required by PCP data logging is determined by the following factors:

* The metrics being logged.
* The logging interval.
* The retention policy.

The default logging (sampling) interval is 60 seconds.

The default retention policy is to keep archives for the last 14 days, compressing archives older than one day.
PCP archive logs are stored in the `/var/log/pcp/pmlogger/_{foreman-example-com}_` directory.
19 changes: 19 additions & 0 deletions guides/doc-Monitoring_Project/topics/con_metrics-overview.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[id='metrics-overview_{context}']
= Metrics Overview

Obtaining metrics from {Project} is useful for troubleshooting a current issue, and capacity planning.
This guide describes how to collect live metrics and archive them for a fixed period of time.
ifdef::satellite[]
If you need to raise a support case with {Team} to resolve a performance issue, the archived data provides valuable insight.
Note that {Team} Support can only access the archived data if you upload it to a Support Case.
endif::[]

You can collect the following metrics from {Project}:

* Basic statistics from the operating system, including system load, memory utilization, and input/output operations.
* Process statistics, including memory and CPU utilization.
* Apache HTTP Server activity statistics.
* PostgreSQL activity statistics.
* {Project} application statistics.

Use Performance Co-Pilot (PCP) to collect and archive {Project} metrics.
12 changes: 0 additions & 12 deletions guides/doc-Monitoring_Project/topics/con_metrics-storage.adoc

This file was deleted.

17 changes: 12 additions & 5 deletions guides/doc-Monitoring_Project/topics/con_pcp-metrics.adoc
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
[id='pcp-metrics_{context}']
= PCP Metrics

Metrics are stored in a tree-like structure. For example, all network metrics are stored in a node named `network`. Each metric may be a single value, or a list of values, known as instances. For example, kernel load has three instances, a 1-minute, 5-minute, and 15-minute average.
Metrics are stored in a tree-like structure.
For example, all network metrics are stored in a node named `network`.
Each metric may be a single value, or a list of values, known as instances.
For example, kernel load has three instances, a 1-minute, 5-minute, and 15-minute average.

For every metric entry, PCP stores both its data and metadata. This includes the metrics description, data type, units, and dimensions. For example, the metadata enables PCP to output multiple metrics with different dimensions.
For every metric entry, PCP stores both its data and metadata.
This includes the metrics description, data type, units, and dimensions.
For example, the metadata enables PCP to output multiple metrics with different dimensions.

The value of a counter metric only increases. For example, a count of disk write operations on a specific device only increases. When you query the value of a counter metric, PCP converts this into a rate value by default.
The value of a counter metric only increases.
For example, a count of disk write operations on a specific device only increases.
When you query the value of a counter metric, PCP converts this into a rate value by default.

In addition to system metrics such as CPU, memory, kernel, XFS, disk, and network, the following metrics are configured:

[%header,cols=2*]
[%header,cols=2*]
|===
|Metric
|Description
Expand All @@ -23,6 +30,6 @@ In addition to system metrics such as CPU, memory, kernel, XFS, disk, and networ
|postgresql.*
|Basic PostgreSQL statistics

|mmv.fm_rails_*
|openmetrics.foreman.fm_rails_*
|{Project} metrics
|===
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[id='performance-co-pilot_{context}']
= Performance Co-Pilot

Performance Co-Pilot (PCP) is a suite of tools and libraries for acquiring, storing, and analyzing system-level performance measurements. PCP can be used to analyze live and historical metrics. Metrics can be retrieved and presented via the CLI, or a web UI.
Performance Co-Pilot (PCP) is a suite of tools and libraries for acquiring, storing, and analyzing system-level performance measurements.
PCP can be used to analyze live and historical metrics.
You can retrieve and view metrics through a CLI or a web UI.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[id='performance-metric-domain-agents_{context}']
= Performance Metric Domain Agents

A Performance Metric Domain Agent (PMDA) is a PCP add-on which enables access to metrics of an application or service. To gather all metrics relevant to {Project}, you must install PMDAs for Apache HTTP Server and PostgreSQL.
A Performance Metric Domain Agent (PMDA) is a PCP add-on which enables access to metrics of an application or service.
To gather all metrics relevant to {Project}, you must install PMDAs for Apache HTTP Server and PostgreSQL.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[id='retrieving-metrics-using-the-cli_{context}']
= Retrieving Metrics using the CLI

Using the CLI tools provided with PCP, you can retrieve metrics either live or from an archive file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
[id='retrieving-metrics_{context}']
= Retrieving Metrics

You can retrieve metrics from PCP using the CLI or the web UI interfaces. A number of CLI tools are provided with PCP, which can either output live data, or data from archived sources. The web UI interfaces are provided by the Grafana and Vector web applications. Vector connects directly to the PCP daemon, and can only display live data. Grafana reads from PCP archive files and can display data to up to 1 year old.
You can retrieve metrics from PCP using the CLI or the web UI interface.
A number of CLI tools are provided with PCP, which can either output live data, or data from archived sources.
ifndef::foreman-deb[]
The web UI interface is provided by the Grafana web application.
endif::[]
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
[id='changing-data-retention_{context}']
[id='changing-data-retention-policy_{context}']
= Changing Data Retention Policy

This procedure describes how to change the data retention policy.

.Procedure

. Edit the `/etc/cron.d/pcp-pmlogger` file.

. Find the line containing `pmlogger_daily`.

. Change the value for parameter `-x` to the desired number of days after which data is archived.

ifndef::foreman-deb[]
. Edit the `/etc/sysconfig/pmlogger_timers` file.
endif::[]
ifdef::foreman-deb[]
. Edit the `/etc/default/pmlogger_timers` file.
endif::[]
. Find the line containing `PMLOGGER_DAILY_PARAMS`.
. If it is commented, uncomment the line.
. Ensure the default parameter `-E` is present.
. Add parameter `-x`, and add a value for the desired number of days after which data is archived.
. Add parameter `-k`, and add a value for the number of days after which data is deleted.
+
For example, the parameters `-x 4 -k 7` specify that data will be compressed after 4 days, and deleted after 7 days.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
This procedure describes how to change the default logging interval.

.Procedure

. Edit the `/etc/pcp/pmlogger/control.d/local` configuration file.

. Edit the LOCALHOSTNAME line and append `-t __XX__s`, where _XX_ is the desired time interval, measured in seconds.

. Restart the `pmlogger` service.
. Restart the `pmlogger` service.
Loading

0 comments on commit 439aea7

Please sign in to comment.