PHP code example of jonnyanyc / gmetric-php

1. Go to this page and download the library: Download jonnyanyc/gmetric-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jonnyanyc / gmetric-php example snippets


$gmetric = new \jonnyanyc\Ganglia\Gmetric\Gmetric();

$gmetric->sendMetric("app1.job2.execution_time", "app", "float", 3.12, "hours");
$gmetric->sendMetric("app1.job2.method3.failures", "app", "uint16", 3, "failures");
// send more metrics if needed

composer 
javascript
    "c/gmetric-php": "~0.2.0"
    }