https://github.com/cybercog/php-opentsdb-client
OpenTSDB PHP HTTP API Client
https://github.com/cybercog/php-opentsdb-client
montoring observability open-tsdb opentsdb opentsdb-api opentsdb-http opentsdb-php victoriametrics
Last synced: 2 months ago
JSON representation
OpenTSDB PHP HTTP API Client
- Host: GitHub
- URL: https://github.com/cybercog/php-opentsdb-client
- Owner: cybercog
- License: mit
- Created: 2024-08-30T07:46:40.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-04T21:07:44.000Z (10 months ago)
- Last Synced: 2025-05-10T16:39:24.672Z (5 months ago)
- Topics: montoring, observability, open-tsdb, opentsdb, opentsdb-api, opentsdb-http, opentsdb-php, victoriametrics
- Language: PHP
- Homepage:
- Size: 35.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP OpenTSDB HTTP API Client
## Introduction
This package allows you to send (push) metrics (data points) to the OpenTSDB database
from the PHP application using an HTTP API.- [OpenTSDB HTTP API](http://opentsdb.net/docs/build/html/api_http/index.html)
This package does not cover Telnet API, and that's why:
- Telnet API use cases: quick tests, debugging, or simple commands in a development environment.
- HTTP API use cases: production applications, complex data queries, integrations with other systems, and secure communications.OpenTSDB HTTP API supported by:
- [VictoriaMetrics](https://docs.victoriametrics.com/#sending-opentsdb-data-via-http-apiput-requests) (because of [limited functionality](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/959) only `sendDataPointList` method is supported)## What is OpenTSDB
OpenTSDB is a distributed, scalable Time Series Database (TSDB) written on top of HBase.
OpenTSDB was written to address a common need: store, index and serve metrics collected
from computer systems (network gear, operating systems, applications) at a large scale,
and make this data easily accessible and graphable.OpenTSDB provides an HTTP based application programming interface to enable
integration with external systems. Almost all OpenTSDB features are accessible
via the API such as querying time-series data, managing metadata and storing data points.## Usage
```php
$dataPointList[] = new \Cog\OpenTsdbClient\DataPoint(
metric: 'temperature',
timestamp: time(),
value: -38.04,
tags: ['place' => 'south_pole'],
);
$dataPointList[] = new \Cog\OpenTsdbClient\DataPoint(
metric: 'temperature',
timestamp: time(),
value: -2.12,
tags: ['place' => 'north_pole'],
);$openTsdbClient = new \Cog\OpenTsdbClient\OpenTsdbClient(
httpClient: \Http\Adapter\Guzzle7\Client::createWithConfig(
[
'timeout' => 4,
'connect_timeout' => 2,
'http_errors' => false,
],
),
baseUri: 'http://opentsdb:4242',
);$openTsdbClient->sendDataPointList($dataPointList);
```## Alternatives
- Java: [sps/metrics-opentsdb](https://github.com/sps/metrics-opentsdb)
- Go: [bluebreezecf/opentsdb-goclient](https://github.com/bluebreezecf/opentsdb-goclient)
- .net: [dejanfajfar/openTSDB.net](https://github.com/dejanfajfar/openTSDB.net)## License
- `PHP OpenTSDB HTTP API Client` package is open-sourced software licensed under the [MIT license](LICENSE) by [Anton Komarev].
## 🌟 Stargazers over time
[](https://yhype.me?utm_source=github&utm_medium=cybercog-php-opentsdb-client&utm_content=chart-repository-star-cumulative)
## About CyberCog
[CyberCog] is a Social Unity of enthusiasts. Research the best solutions in product & software development is our passion.
- [Follow us on Twitter](https://twitter.com/cybercog)
[Anton Komarev]: https://komarev.com
[CyberCog]: https://cybercog.su