2017 © Pedro Peláez
 

library loggly-retrieving-data

Loggly retrieving data library for PHP

image

kirarpit/loggly-retrieving-data

Loggly retrieving data library for PHP

  • Wednesday, August 31, 2016
  • by kirarpit
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Loggly Event Retrieval API Library

loggly-retrieving-data is the PHP library of Loggly Retrieving Data API., (*1)

Installation

composer require kirarpit/loggly-retrieving-data, (*2)

Usage

Anything which can be searched on Loggly Search Panel could be queried here and the resulted events would be returned along with the total number of such events., (*3)

The must defined parameters for a search are 'query', 'from_timestamp' and 'to_timestamp', rest are optional., (*4)

Optional size parameter in the query defines the number of events fetched in a single page. The maximum value it can take is 5000, after which another curl request is to be made with shorter duration as described in the Loggly Retrieving Data API, which is automatically handled by the library under the hood., (*5)

<?php

use kirarpit\logglyRetrievingData\Loggly;

// array of search query
$search = array(
        'query' => 'nginx.status:200 AND nginx.requestURI:"/favicon.ico"',
        'from_timestamp' => strtotime(date('Y-m-d H:i:s', strtotime('-5 minutes'))),
        'to_timestamp' => time(),
        'size' => '2000', // optional (defaults '1000')
        'order'=>'asc' // optional (defaults 'desc')
           );

$loggly = new Loggly(LOGGLY_SUBDOMAIN, LOGGLY_USER, LOGGLY_PASSWORD);

$result = $loggly->query($search);

Contributing

See CONTRIBUTING.md., (*6)

License

MIT, (*7)

The Versions

31/08 2016

dev-master

9999999-dev https://github.com/kirarpit/loggly-retrieving-data

Loggly retrieving data library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.2.0
  • ext-curl *

 

loggly retrieving data api loggly api loggly php loggly search

31/08 2016

v0.1.0

0.1.0.0 https://github.com/kirarpit/loggly-retrieving-data

Loggly retrieving data library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.2.0
  • ext-curl *

 

loggly retrieving data api loggly api loggly php loggly search