2017 © Pedro Peláez
 

library prtg-php

PHP API Wrapper for PRTG

image

satrobit/prtg-php

PHP API Wrapper for PRTG

  • Thursday, August 3, 2017
  • by satrobit
  • Repository
  • 1 Watchers
  • 1 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 15 % Grown

The README.md

prtg-php

Using this library you can get details on your sensors , create charts and more, (*1)

Install

Using Composer

Add this package to your composer.json:, (*2)

"require": {
    "satrobit/prtg-php": "dev-master"
}

or by command line :, (*3)

composer require satrobit/prtg-php

Usage

You need to construct a client first., (*4)

$client = new prtg(SERVER, USERNAME, PASSWORD);

like this:, (*5)

$client = new prtg('https://prtg.paessler.com/', 'demo', 'demo');

Now you can use these methods to interact with the API:, (*6)

Method: getsensordetails

This method returns details of a specified sensor, (*7)

Parameters: , (*8)

Name Type Description
sensorId int Sensor ID in PRTG

Example:, (*9)

$sensorDetails = $client->getsensordetails(2017);

Method: historicdata

This method returns historic data on a specified sensor, (*10)

Parameters: , (*11)

Name Type Description
sensorId int Sensor ID in PRTG
sdate string Starting date
edate string Ending date
avg int Average

Example:, (*12)

$historicData = $client->historicdata('2017', '2017-07-26', '2017-07-27', 15);

Method: chart

This method returns a chart of a specified sensor, (*13)

Parameters: , (*14)

Name Type Description
sensorId int Sensor ID in PRTG
sdate string Starting date
edate string Ending date
graphid int Graph ID
type string Returned object type like svg, png
avg int Average
height int Height of the chart (px)
width int Width of the chart (px)

Example:, (*15)

$chart = $client->chart(2017, '2017-07-26', '2017-07-27', 2, 'svg', 15, 270, 850);

Examples

Check out examples.php ., (*16)

License

This project is released under the MIT License., (*17)

The Versions

03/08 2017

dev-master

9999999-dev https://github.com/satrobit/prtg-php

PHP API Wrapper for PRTG

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

monitoring network prtg prtg-php