Giter Site home page Giter Site logo

wal-g-prometheus-exporter's People

Contributors

vampouille avatar jgodin-c2c avatar

Stargazers

Alexander avatar Eth avatar Vitaliy Filyuchkov avatar  avatar  avatar Daniel Degasperi avatar Alexander avatar Anton Patsev avatar Andrey Borodin avatar

Watchers

Daniel Degasperi avatar Christian Kaenzig avatar James Cloos avatar Alexandre Fayolle avatar Maurer Luc avatar  avatar  avatar  avatar  avatar

wal-g-prometheus-exporter's Issues

AttributeError: 'NoneType' object has no attribute 'timestamp' in `last_xlog_upload_callback`

Potential bug?

Our exporter has worked fine for months, and a few days ago it started emitting logs like this one:

Traceback (most recent call last):
AttributeError: 'NoneType' object has no attribute 'timestamp'
 File "exporter.py", line 239, in last_xlog_upload_callback
 File "prometheus_client/metrics.py", line 420, in samples
 File "prometheus_client/metrics.py", line 213, in _samples
 File "prometheus_client/metrics.py", line 220, in _multi_samples
 File "prometheus_client/metrics.py", line 94, in collect
 File "prometheus_client/registry.py", line 83, in collect
 File "prometheus_client/openmetrics/exposition.py", line 22, in generate_latest
 File "prometheus_client/exposition.py", line 104, in _bake_output
 File "prometheus_client/exposition.py", line 122, in prometheus_app
 File "wsgiref/handlers.py", line 137, in run

i.e. here:

return archive_status['last_archived_time'].timestamp()

(I have different line numbers, due to us using this fork with the changes from #3: https://github.com/pagero/wal-g-prometheus-exporter)

Alternative to SIGHUP for recurringly updating metrics for basebackups

Since Kubernetes doesn't support sending signals (i.e. SIGHUP) to pods/containers, it would be nice being able to trigger/schedule updates of metrics related to basebackups

Related to this in the current implementation:

# Launch exporter
exporter = Exporter()
# listen to SIGHUP signal
signal.signal(signal.SIGHUP, exporter.update_basebackup)

&

def update_basebackup(self, *unused):
"""
When this script receive a SIGHUP signal, it will call backup-list
and update metrics about basebackups
"""

What do you think?

Enable use of wal-g config file

Hi,

i am interested in exporting metrics from a wal-g instance that streams the arhive to S3 and uses a config-file similar to:

{
  "WALG_S3_PREFIX": "s3://",
  "AWS_ACCESS_KEY_ID": "",
  "AWS_SECRET_ACCESS_KEY": "",
  "AWS_ENDPOINT": "",
  "AWS_S3_FORCE_PATH_STYLE": "true",
  "WALG_S3_CA_CERT_FILE": "",
  "PGPASSWORD": "",
  "PGHOST": "",
  "PGPORT": 5432
}

And run as wal-g --config /x/y/z.json backup-list.

It would be very useful to be able to specify the same config to the exporters. Currently i am getting an error when the exporter runs wal-g backup-list...

Might be even worth using the wal-g config as input for the exporter..?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.