importPrometheus and importOpenMetrics under the push YAML collection in the
Collector configuration:
/import/openmetrics and /import/prometheus from the
listenAddress, which defaults to 0.0.0.0:3030.
extra_label: pass in repeated, default labels for all time series, formatted asname=value.default_timestamp: provide a default timestamp in Unix milliseconds for any time series that doesn’t have one. Otherwise, the value defaults toNow()on the Palo Alto Networks Cortex XCOR backend.
Export Prometheus assets
You can use Chronoctl to sync Prometheus rule definitions and Alertmanager configuration into Cortex XCOR over the Cortex XCOR API.You need Chronoctl installed and configured. Read the
Chronoctl documentation for more details.
-
In your Prometheus installation, retrieve your Prometheus rules into a YAML file:
-
Gather the Alertmanager configuration you want evaluated with those rules (for
example, your existing
alertmanager.yml). -
Run
chronoctl sync prometheus. You must pass both Prometheus rules and Alertmanager YAML (-pand-a):Chronoctl prints a changelog of changes applied in Cortex XCOR. To preview changes without writing them, add--dry-run. To control how rules map to teams and collections, pass a Cortex XCOR mapping file with-c:
chronoctl sync prometheus --help or see the
Chronoctl documentation.