/p4prometheus

[Community Supported] Perforce (Helix Core) interface for writing Prometheus metrics from real-time analysis of p4d log files.

Primary LanguageGoMIT LicenseMIT

Support

p4prometheus

Utility which integrates Perforce (Helix Core) with Prometheus. If performs real-time analysis of p4d log files feeding to a dashboard and for system alerting.

It continuously parses p4d log files and writes a summary to a specified Prometheus compatible metrics file which can be handled via the node_exporter textfile collector module.

Uses go-libp4dlog for actual log file parsing.

Support Status

This is currently a Community Supported Perforce tool.

Overview

This is part of a solution consisting of the following components:

Two custom components:

  • p4prometheus - This component.
  • monitor_metrics.sh - SDP compatible bash script to generate simple supplementary metrics - monitor_metrics.sh

Check out the Prometheus architecture The custom components referred to above are "Prometheus targets".

Grafana Dashboards

When installed and setup, you can get dashboards such as the following:

Commands Summary:

Commands Summary

Rates for command durations and count:

Commands

Active commands (monitor):

Commands

Replication status:

Commands

Read/write locks held/waiting status:

Commands

Dashboard alerts can be defined, as well as alert rules which are actioned by alertmanager - see installation link below for examples.

Detailed Installation

You need to install Prometheus and Grafana using standard methods. This is typically done on a seperate VM/machine to the Perforce server itself (for security and HA reasons).

Note that all the components do run on Windows but you will need an appropriate Service wrapper.

See Detailed Installation Instructions (INSTALL.md) in this project.