vchimishuk / python-pyrite

python-pyrite is a Python3 library to send Graphite metrics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NAME
    python-pyrite is a Python3 library to send Graphite metrics

DOCUMENTATION
    python-pyrite periodically makes metrics snapshot and sends to Graphite
    over TCP protocol. If send operation failed metrics are stored inside buffer
    and will be sent withing next attempt.

EXAMPLE
    import pyrite

    # Create client.
    g = pyrite.Pyrite('graphite.host', 2003, prefix='my-app')

    # Create gauge metric. Gauge value will be generated every time snapshot is
    # created.
    g.gauge('gauge', lambda: int(time.time()))

    # Simple counter metric.
    g.counter('counter').inc()

    # Series metric calculates sum, min, max, count, average, median,
    # 75, 95 and 99 percentiles values.
    g.series('series').add(1.4)

    # Close client at the end, to be sure that all metrics have been sent
    # and internal thread terminated.
    g.close()

AUTHORS
    Viacheslav Chimishuk <vchimishuk@yandex.ru>

COPYING
    This programm is released under the GNU General Public License version 3 or later, which is
    distributed in the COPYING file. You should have received a copy of the GNU General Public License along with
    this program.  If not, see <http://www.gnu.org/licenses/>.

About

python-pyrite is a Python3 library to send Graphite metrics

License:GNU General Public License v3.0


Languages

Language:Python 100.0%