Metadata-Version: 2.1
Name: plow
Version: 0.0.1
Summary: Plow is a tool to scrape logs, run commands and export metrics and events
Home-page: https://git.dreamhost.com/dreamhost/data/plow
Author: Jordan Tardif
Author-email: jordan@dreamhost.com
License: unlicensed
Platform: UNKNOWN
Description-Content-Type: text/markdown
License-File: LICENSE.md

# Plow is a tool to scrape and export metrics

![](docs/plow.png)

## Installation

## Development

This project includes a number of helpers in the `Makefile` to streamline common development tasks.

### Environment Setup

The following demonstrates setting up and working with a development environment:

```
### create a virtualenv for development

$ make virtualenv

$ source env/bin/activate


### run plow cli application

$ plow --help


### run style checks

$ make style

### autopep for style corrections

$ make autopep

```

## Configuration
plow can be configured via ENV variables or a cement framework yaml file. all
configuration code is provided by the cement framework
(https://github.com/datafolklabs/cement/)

examples of configuration can be found in examples/plow.yml

## Commands

### Scrapers

The scrape command will read various log formats and parse them into metrics
defined by 'scrapers'. For example, the apache scraper would be run via

```
$ plow -d scrape -t apache -l examples/logs/apache2.log
```

### Pollers

The poll command will run a command(s) and parse output into metrics
defined by 'pollers'. For example, the 'dhwp' scraper would be run via

```
$ plow -d poll -t dhwp
```

### Exporter

The exporter command will start a basic HTTP server that exports metrics
generated by scrapes/polls in prometheus format.

```
$ plow exporter
```

### Worker

The worker command will look at the jobs.yml file to schedule scrapers,
pollers or pushers on a reoccuring basis. For examples see examples/jobs.yml

```
$ plow worker -f examples/jobs.yml
```

### Dump
The dump command will look at the state of a 'scrape' or 'poll' and print the
output of that state in prometheus format

```
$ plow dump -t apache
```


