Metadata-Version: 2.1
Name: telegraf-cloudflare
Version: 0.2.2
Summary: Plugin for Telegraf for gathering statistics from Cloudflare
Home-page: https://github.com/SebastianCzoch/telegraf-cloudflare
Author: Sebastian Czoch
Author-email: sebastian@czoch.pl
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: requests (>=2.19)
Requires-Dist: python-dateutil (>=2.7.3)
Requires-Dist: mock; python_version < "3.3"

# telegraf-cloudflare
[![Build Status](https://travis-ci.org/SebastianCzoch/telegraf-cloudflare.svg?branch=master)](https://travis-ci.org/SebastianCzoch/telegraf-cloudflare/branches) [![PyPI version](https://badge.fury.io/py/telegraf-cloudflare.svg)](https://badge.fury.io/py/telegraf-cloudflare) [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/SebastianCzoch/telegraf-cloudflare/blob/master/LICENSE)

Plugin for Telegraf for gathering statistics from Cloudflare

This script is in beta version, use with caution

## Installation
```bash
$ pip install telegraf-cloudflare
```

## Usage
```bash
$ telegraf-cloudflare --zone-id ZONE_ID --email you@example.com --api-key SECRET
```

### Optional parameters
* `--interval` (int)
  * Last 60 minutes (value from 59 to 1): 1 minute resolution
  * Last 7 hours (value from 419 to 60): 15 minutes resolution
  * Last 15 hours (value from 899 to 420): 30 minutes resolution
  * Last 72 hours (value from 4320 to 900): 1 hour resolution
  * Older than 3 days (value 525600 to 4320): 1 day resolution

  Not all intervals are available in all plans, more information is available [here](https://api.cloudflare.com/#zone-analytics-dashboard)

### Example telegraf configuration
```
[[inputs.exec]]
  interval = 6h
  commands = ["telegraf-cloudflare telegraf-cloudflare --zone-id ZONE_ID --email you@example.com --api-key SECRET"]
  data_format = "influx"
```

## License
See [LICENSE](https://github.com/SebastianCzoch/telegraf-cloudflare/blob/master/LICENSE) file.


