Metadata-Version: 2.1
Name: py-node-collector
Version: 0.0.3
Summary: Python wrapper for Prometheus Node Collector https://github.com/shadowy-pycoder/go-node-collector
Home-page: https://github.com/shadowy-pycoder/py-node-collector
Author: shadowy-pycoder
Author-email: shadowy-pycoder@example.com
License: UNKNOWN
Keywords: prometheus,metrics,prometheus-collector,prometheus-node-exporter
Platform: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Description-Content-Type: text/markdown

# Python Node Collector

A python wrapper for [Prometheus Node Collector](https://github.com/shadowy-pycoder/go-node-collector) 

# Installation

```shell
pip install py-node-collector
```

# Usage


```python
from prometheus_client import parser
from py_node_collector import collector

metric = next(parser.text_string_to_metric_families(collector.collect()))
print(metric)
```

```shell
# Output
Metric(go_gc_duration_seconds, A summary of the pause duration of garbage collection cycles., summary, , 
[Sample(name='go_gc_duration_seconds', labels={'quantile': '0'}, value=0.0, timestamp=None, exemplar=None), 
Sample(name='go_gc_duration_seconds', labels={'quantile': '0.25'}, value=0.0, timestamp=None, exemplar=None), 
Sample(name='go_gc_duration_seconds', labels={'quantile': '0.5'}, value=0.0, timestamp=None, exemplar=None), 
Sample(name='go_gc_duration_seconds', labels={'quantile': '0.75'}, value=0.0, timestamp=None, exemplar=None), 
Sample(name='go_gc_duration_seconds', labels={'quantile': '1'}, value=0.0, timestamp=None, exemplar=None), 
Sample(name='go_gc_duration_seconds_sum', labels={}, value=0.0, timestamp=None, exemplar=None), 
Sample(name='go_gc_duration_seconds_count', labels={}, value=0.0, timestamp=None, exemplar=None)])
```

