<commit_before>'\"macro stdmacro
.\"
.\" Copyright (c) 2017 <NAME>.
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\"
.\"
.TH PMDAPROMETHEUS 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmdaprometheus\f1 \- Prometheus PMDA
.SH DESCRIPTION
\fBpmdaoprometheus\fR is a Performance Metrics Domain Agent (PMDA) which imports
metrics from Prometheus endpoints which expose text based Prometheus metrics.
.PP
Further details on the Prometheus exposition format can
be found at
.I https://prometheus.io/docs/instrumenting/exposition_formats
.SH METADATA SOURCES
.B pmdaprometheus
scans the
.I $PCP_PMDAS_DIR/prometheus/metadata
directory, looking for metadata files (\c
.IR *.json).
These JSON metadata files describe the names, types, etc.
of their associated Prometheus metrics for a given endpoint.
For example, let's assume the following simple Prometheus metric:
.PP
.nf
.fam C
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 86
.fam T
.fi
.PP
The associated metadata file would look like the following:
.PP
.nf
.fam C
{
  "metrics": [
    {
      "semantics": "instantaneous",
      "type": "uint64",
      "units_str": "",
      "prometheus_name": "go_goroutines",
      "name": "go_goroutines",
      "description": "Number of goroutines that currently exist."
    }
  ]
}
.fam T
.fi
.PP
Allowable values for each of the metadata fields are:
.TP
\fB semantics\fR=[counter, instantaneous]\/\fR
the semantics of the metric
.TP
\fB type\fR=[double, uint64]\/\fR
the base data type of the metric
.TP
\fB name\fR=\fI\,STRING\/\fR
name of the metric to be used in PCP
.TP
\fB units_str\fR=\fI\,STRING\/\fR
the dimension and units of the metric which can be parsed by \fIpmParseUnitsStr\fR(3)
.TP
\fB prometheus_name\fR=\fI\,STRING\/\fR
complete metric name as used in Prometheus
.TP
\fB description\fR=\fI\,STRING\/\fR
text description of the metric
.SH METADATA GENERATOR
The
.B pmdaprometheus
metadata generation helper script
helps in providing initial content for the (heuristic-based)
metric metadata, from a Prometheus endpoint.
.PP
.B $PCP_PMDAS_DIR/prometheus/Generate
[\fI\,OPTIONS]
.PP
Mandatory arguments to long options are mandatory for short options too.
Following are the mandatory options:
.TP
\fB\-u\fR, \fB\-\-url\fR=\fI\,STRING\/\fR
URL of the Prometheus endpoint
.TP
\fB\-n\fR, \fB\-\-name\fR=\fI\,STRING\/\fR
name of the Prometheus endpoint
.SH INSTALLATION
Install the Prometheus PMDA by using the Install script as root:
.PP
      # cd $PCP_PMDAS_DIR/prometheus
.br
      # ./Install
.PP
To uninstall, do the following as root:
.PP
      # cd $PCP_PMDAS_DIR/prometheus
.br
      # ./Remove
.PP
\fBpmdaprometheus\fR is launched by \fIpmcd\fR(1) and should never be executed
directly. The Install and Remove scripts notify \fIpmcd\fR(1) when the
agent is installed or removed.
.SH FILES
.IP "\fB$PCP_PMDAS_DIR/prometheus/Install\fR" 4
installation script for the \fBpmdaprometheus\fR agent
.IP "\fB$PCP_PMDAS_DIR/prometheus/Remove\fR" 4
undo installation script for the \fBpmdaprometheus\fR agent
.IP "\fB$PCP_PMDAS_DIR/prometheus/Generate\fR" 4
generate metadata describing available metrics based on heuristics
.IP "\fB$PCP_PMDAS_DIR/prometheus/metadata/\fR" 4
metadata files for the \fBpmdaprometheus\fR agent
.IP "\fB$PCP_LOG_DIR/pmcd/prometheus.log\fR" 4
default log file for error messages from \fBpmdaprometheus\fR
.SH PCP ENVIRONMENT
Environment variables with the prefix \fBPCP_\fR are used to parameterize
the file and directory names used by \fBPCP\fR. On each installation, the
file \fB/etc/pcp.conf\fR contains the local values for these variables.
The \fB$PCP_CONF\fR variable may be used to specify an alternative
configuration file, as described in \fIpcp.conf\fR(5).
.SH SEE ALSO
.BR pmcd (1),
.BR pminfo (1),
.BR pmprobe (1)
and
.IR https://prometheus.io/docs/instrumenting/exposition_formats .
<commit_msg>docs: fix typo pmdaprometheus(1) typo, minor word-smithing<commit_after>'\"macro stdmacro
.\"
.\" Copyright (c) 2017 <NAME>.
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\"
.\"
.TH PMDAPROMETHEUS 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmdaprometheus\f1 \- Prometheus PMDA
.SH DESCRIPTION
\fBpmdaprometheus\fR is a Performance Metrics Domain Agent (PMDA) which
creates PCP metrics from Prometheus endpoints, which provide HTTP based
access to application metrics.
.PP
Further details on the Prometheus exposition format can
be found at
.I https://prometheus.io/docs/instrumenting/exposition_formats
.SH METADATA SOURCES
.B pmdaprometheus
scans the
.I $PCP_PMDAS_DIR/prometheus/metadata
directory, looking for metadata files (\c
.IR *.json).
These JSON metadata files describe the names, types, etc.
of their associated Prometheus metrics for a given endpoint.
For example, let's assume the following simple Prometheus metric:
.PP
.nf
.fam C
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 86
.fam T
.fi
.PP
The associated metadata file would look like the following:
.PP
.nf
.fam C
{
  "metrics": [
    {
      "semantics": "instantaneous",
      "type": "uint64",
      "units_str": "",
      "prometheus_name": "go_goroutines",
      "name": "go_goroutines",
      "description": "Number of goroutines that currently exist."
    }
  ]
}
.fam T
.fi
.PP
Allowable values for each of the metadata fields are:
.TP
\fB semantics\fR=[counter, instantaneous]\/\fR
the semantics of the metric
.TP
\fB type\fR=[double, uint64]\/\fR
the base data type of the metric
.TP
\fB name\fR=\fI\,STRING\/\fR
name of the metric to be used in PCP
.TP
\fB units_str\fR=\fI\,STRING\/\fR
the dimension and units of the metric which can be parsed by \fIpmParseUnitsStr\fR(3)
.TP
\fB prometheus_name\fR=\fI\,STRING\/\fR
complete metric name as used in Prometheus
.TP
\fB description\fR=\fI\,STRING\/\fR
text description of the metric
.SH METADATA GENERATOR
The
.B pmdaprometheus
metadata generation helper script
helps in providing initial content for the (heuristic-based)
metric metadata, from a Prometheus endpoint.
.PP
.B $PCP_PMDAS_DIR/prometheus/Generate
[\fI\,OPTIONS]
.PP
Mandatory arguments to long options are mandatory for short options too.
Following are the mandatory options:
.TP
\fB\-u\fR, \fB\-\-url\fR=\fI\,STRING\/\fR
URL of the Prometheus endpoint
.TP
\fB\-n\fR, \fB\-\-name\fR=\fI\,STRING\/\fR
name of the Prometheus endpoint
.SH INSTALLATION
Install the Prometheus PMDA by using the Install script as root:
.PP
      # cd $PCP_PMDAS_DIR/prometheus
.br
      # ./Install
.PP
To uninstall, do the following as root:
.PP
      # cd $PCP_PMDAS_DIR/prometheus
.br
      # ./Remove
.PP
\fBpmdaprometheus\fR is launched by \fIpmcd\fR(1) and should never be executed
directly. The Install and Remove scripts notify \fIpmcd\fR(1) when the
agent is installed or removed.
.SH FILES
.IP "\fB$PCP_PMDAS_DIR/prometheus/Install\fR" 4
installation script for the \fBpmdaprometheus\fR agent
.IP "\fB$PCP_PMDAS_DIR/prometheus/Remove\fR" 4
undo installation script for the \fBpmdaprometheus\fR agent
.IP "\fB$PCP_PMDAS_DIR/prometheus/Generate\fR" 4
generate metadata describing available metrics based on heuristics
.IP "\fB$PCP_PMDAS_DIR/prometheus/metadata/\fR" 4
metadata files for the \fBpmdaprometheus\fR agent
.IP "\fB$PCP_LOG_DIR/pmcd/prometheus.log\fR" 4
default log file for error messages from \fBpmdaprometheus\fR
.SH PCP ENVIRONMENT
Environment variables with the prefix \fBPCP_\fR are used to parameterize
the file and directory names used by \fBPCP\fR. On each installation, the
file \fB/etc/pcp.conf\fR contains the local values for these variables.
The \fB$PCP_CONF\fR variable may be used to specify an alternative
configuration file, as described in \fIpcp.conf\fR(5).
.SH SEE ALSO
.BR pmcd (1),
.BR pminfo (1),
.BR pmprobe (1)
and
.IR https://prometheus.io/docs/instrumenting/exposition_formats .

{'fraction_non_alphanumeric': 0.09718902924775236, 'fraction_numerical': 0.006031637646523273, 'mean_word_length': 3.8633093525179856, 'pattern_counts': {'":': 14, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6597612', 'n_tokens_mistral': 3125, 'n_tokens_neox': 2860, 'n_words': 1091}