Prometheus exporter for Yii2

Overview

yii2-prometheus

Prometheus Extension for Yii 2


This extension provides a Prometheus exporter component for Yii framework 2.0 applications.

This extension uses the textfile collector of Node Exporter for Prometheus.

Latest Stable Version Total Downloads Build Status

Installation

The preferred way to install this extension is through composer.

composer require --prefer-dist machour/yii2-prometheus

Configuration

In order to exploit the metrics files generated by this extension, you must run the node exporter using the --collector.textfile.directory flag, and point it to a valid directory.

If using systemd to manage your scrappers, your node_exporter.service file may look something like this:

node_exporter.service
[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target

[Service]
User=prometheus
ExecStart=/usr/local/bin/node_exporter --collector.textfile.directory /var/lib/node_exporter/textfile_collector  --web.listen-address="127.0.0.1:9100"

[Install]
WantedBy=default.target

Once the extension is installed, simply modify your application configuration as follows:

return [
    'components' => [
        'prometheusExporter' => [
            'class' => 'machour\yii2\prometheus\components\Exporter',
            
            // Point this to your collector directory. Defaults to '/var/lib/node_exporter/textfile_collector/'
            // 'collectorDir' => '/var/lib/node_exporter/textfile_collector/',
            
            // The default prom file to create if not specified in exportMetric()
            // 'defaultFile' => 'yii2-prometheus-exporter.prom',
        ],
        // ...
    ],
    ...
];
You might also like...
An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)
An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)

yii2-widget-rangeinput The RangeInput widget is a customized range slider control widget based on HTML5 range input. The widget enhances the default H

A Yii2 module for embedding social plugins and widgets.
A Yii2 module for embedding social plugins and widgets.

yii2-social Module that enables access to social plugins for Yii Framework 2.0. It includes support for embedding plugins from the following networks

Pug Yii2 adapter

Yii 2 Pug (ex Jade) extension This extension provides a view renderer for Pug templates for Yii framework 2.0 applications. Support GutHub issues Inst

This is Yii2 utilities

YII2-UTILITY This is Yii2 utilities. Requirements PHP = 7.4 Curl extension for PHP7 must be enabled. Download Using Composer From your project direct

Alejandro Flores, Php Yii2 Emoac

Prueba Tecnica Emoac Proyecto basado en PHP con Yii2. Hecho por Alejandro Flores, Ingeniero en informática. Este proyecto consta de un CRUD de product

Shelly Plug Prometheus exporter.

Shelly Plug Prometheus Exporter I am a simple man. I have a Shelly Plug. I don't want to flash a different firmware on it just to get a Prometheus end

AirGradient Prometheus exporter.

AirGradient Prometheus Exporter AirGradient has a DIY air sensor. I built one (actually, more than one). I want to integrate sensor data into my in-ho

Export Laravel Horizon metrics using this Prometheus exporter.

Laravel Horizon Prometheus Exporter Export Laravel Horizon metrics using this Prometheus exporter. This package leverages Exporter Contracts. 🤝 Suppo

Export Laravel Octane metrics using this Prometheus exporter.

Laravel Octane Prometheus Exporter Export Laravel Octane metrics using this Prometheus exporter. 🤝 Supporting If you are using one or more Renoki Co.

Simple Magento 2 Prometheus Exporter.

Magento 2 Prometheus Exporter This Magento 2 Module exposes a new route under /metrics with Magento 2 specific metrics in the format of prometheus. Th

An extended bootstrap alert and alert block widget for Yii2 (sub repo split from yii2-widgets)
An extended bootstrap alert and alert block widget for Yii2 (sub repo split from yii2-widgets)

yii2-widget-alert This extension contains a couple of useful widgets. The Alert widget extends the \yii\bootstrap\Alert widget with more easy styling

Simple RBAC Manager for Yii2 (minify of yii2-admin)
Simple RBAC Manager for Yii2 (minify of yii2-admin)

Yii2 Mimin Simple RBAC Manager fo Yii 2.0. Minify of yii2-admin extension with awesome features Attention Before you install and use this extension, t

The Prometheus monitoring system and time series database.

Prometheus Visit prometheus.io for the full documentation, examples and guides. Prometheus, a Cloud Native Computing Foundation project, is a systems

This project aims to facilitate the management of websites monitored by the blackbox exporter, via a web UI.

This project aims to facilitate the management of websites monitored by the blackbox exporter, via a web UI. The UI would allow to add/remove sites, groups, and even add different fields in the prometheus database.

yii2 MinIO

yii2-minio Yii2 MinIO Installation php composer.phar require bevin1984/yii2-minio:^0.0.1 Or "bevin1984/yii2-minio": "^0.0.1" Configuration 'components

Basic Crud Generator (With Code Files, like GII (YII2)) Using Laravel, Livewire and Tailwind CSS
Basic Crud Generator (With Code Files, like GII (YII2)) Using Laravel, Livewire and Tailwind CSS

LiveCrud Live Crud Generator. This package generates Basic Crud with Livewire. Features Generate Complete Crud With Livewire Component and Blade Files

 Yii2 Annotations Generate API Document Extension
Yii2 Annotations Generate API Document Extension

Generate online api document by code annotation for yii2 easily

Tarantool connector for yii2 framework. Allow to use activerecord, schemas, widgets and more.

Tarantool connector for yii2 framework Tarantool connector for yii2 framework. Allow to use framework abstractions such as ActiveRecord, Schema, Table

Web Push Notifications brought to Yii2

Web Push Notifications for Yii 2 An extension for implementing Web Push Notifications on your website in a breeze. Documentation is at docs/README.md

Releases(2.0.1)
Owner
Mehdi Achour
Mehdi Achour
Simple RBAC Manager for Yii2 (minify of yii2-admin)

Yii2 Mimin Simple RBAC Manager fo Yii 2.0. Minify of yii2-admin extension with awesome features Attention Before you install and use this extension, t

Hafid Mukhlasin 52 Sep 22, 2022
Tarantool connector for yii2 framework. Allow to use activerecord, schemas, widgets and more.

Tarantool connector for yii2 framework Tarantool connector for yii2 framework. Allow to use framework abstractions such as ActiveRecord, Schema, Table

Andrey 11 Nov 21, 2021
Web Push Notifications brought to Yii2

Web Push Notifications for Yii 2 An extension for implementing Web Push Notifications on your website in a breeze. Documentation is at docs/README.md

Mehdi Achour 12 May 19, 2022
yii2-app-advanced with Twitter Bootstrap 5

Yii 2 Advanced Project Template is a skeleton Yii 2 application best for developing complex Web applications with multiple tiers.

Nedarta 1 Nov 5, 2021
Yii2-symfonymailer - Yii 2 Symfony mailer extension.

Yii Mailer Library - Symfony Mailer Extension This extension provides a Symfony Mailer mail solution for Yii framework 2.0. For license information ch

Yii Software 28 Dec 22, 2022
Yii2 console application used to write our processors of methods to responsible to client calling.

Microservice Application Skeleton Yii2 console application used to write our processors of methods to responsible to client calling. This application

Jafaripur 0 Mar 10, 2022
Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker

Yii2 Date/Time Picker Widget Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker Demo Since this is a part of

Yevhen Terentiev 8 Mar 14, 2022
Yii2 extension for format inputs based on AutoNumeric.js

Yii2 extension for format inputs based on AutoNumeric.js

extead 2 Oct 7, 2019
Yii2 SwitchInput widget turns checkboxes and radio buttons into toggle switchinputes

Yii2 SwitchInput widget turns checkboxes and radio buttons into toggle switchinputes

Kartik Visweswaran 38 Sep 21, 2022
An enhanced FileInput widget for Bootstrap 4.x/3.x with file preview, multiple selection, and more features (sub repo split from yii2-widgets)

yii2-widget-fileinput The FileInput widget is a customized file input widget based on Krajee's Bootstrap FileInput JQuery Plugin. The widget enhances

Kartik Visweswaran 227 Nov 6, 2022