Skip to main content
# sql2statsd

`sql2statsd` is a CLI utility that queries SQL database and posts results to
[StatsD](https://github.com/etsy/statsd)
based on a provided YAML config file and a job name.


## Installation

`virtualenv` recommended.

- From Github:
```
pip install -e git+https://github.com/Suenweek/sql2statsd#egg=sql2statsd
```


## Usage
`sql2statsd` is intended to be run as a scheduled task (e.g. a `cron` job).

1. Create a YAML config file based on a config schema provided below.
2. Run `sql2statsd --config-file <CONFIG_FILE> <JOB_NAME>` where:
- `<CONFIG_FILE>` is a path to your config.
- `<JOB_NAME>` is a key in a `config["jobs"]` section.

Passing config file path as a parameter each time is tedious, so you may want
to specify `SQL2STATSD_CONFIG_FILE` env var instead.


## Config schema

```yaml
db_servers:
<str>: # Database server name
host: <str>
port: <int>
user: <str>
password: <str>

stats_servers:
<str>: # Stats server name
host: <str>
port: <int>

jobs:
<str>: # Job name
db_server: <str> # Database server name
db_name: <str>
stats_server: <str> # Stats server name
stat: <str>
query: <str>
```

Metadata

Release files for sql2statsd 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for sql2statsd 0.0.1
File Interpreter ABI Platform Actions
sql2statsd-0.0.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for sql2statsd-0.0.1-py2.py3-none-any.whl

Release files / sql2statsd-0.0.1-py2.py3-none-any.whl

Download URL sql2statsd-0.0.1-py2.py3-none-any.whl
Size 4.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4f0d0fc5f8df6048a417a73db6db3c65194525f384bf84dcf0eddc040c5f9322
BLAKE2b-256 checksum
How to use checksums
6217c1eada5910826fa7c028fe9296a956dd0710280bf6fc0518c664d22a8ad7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for sql2statsd 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page