Coder Social home page Coder Social logo

canonical / charm-prometheus-juju-exporter Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 8.0 157 KB

Charm that deploys exporter, publishing statistics about juju-deployed machines

License: Apache License 2.0

Makefile 1.27% Shell 0.20% Python 98.40% Jinja 0.12%

charm-prometheus-juju-exporter's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

charm-prometheus-juju-exporter's Issues

Update README to align with the current state

When the README was initially created, neither the Prometheus Juju Exporter snap or charm is published, so we were asking the users to manually build and deploy the packages. Now that they are officially published (snap, charm), we should replace this part of README and update it according to its discourse documentation.

Additionally, integration with COS is the new standard and the README should reflect that.

It would also be great to make other enhancements to the README by taking references of the documentation.

Replace charmhelpers

We currently use charmhelpers for snap installations and opening of "charm ports". We'll soon be able to replace it with "native" functionality:

Once the new version of ops is released we'll be able to replace charmhelpers completely.

Add suport for juju 3.3

Hi we got a first cloud with juju 3.3 could you please add support for it to prometheus-juju--exporter

core22 snap installation issues in air-gapped environments

I tried to deploy the charm in a "temporarily air-gapped" environment but it failed with the following error:

unit-prometheus-juju-exporter-0: 10:34:25 WARNING unit.prometheus-juju-exporter/0.install error: cannot perform the following tasks:
unit-prometheus-juju-exporter-0: 10:34:25 WARNING unit.prometheus-juju-exporter/0.install - Ensure prerequisites for "prometheus-juju-exporter" are available (cannot install snap base "core22": Post https://api.snapcraft.io/v2/snaps/refresh: Proxy Authentication Required)

I attached the local snap as follows:

juju attach-resource prometheus-juju-exporter exporter-snap=./prometheus-juju-exporter_3.snap

But snap core22 was still missing and currently, it's impossible to attach it as the resource.

My proposal is to implement a new resource for the core snap, similar to how other charms do it.

Add suport for juju 3.5

We are aiming to switch to juju 3.5 as this is new LTS version this year, could you please enable support for it as well.
This task is important but not urgent

Add support for HA deployments

The exporter's controller-url accepts only a single URL as its value, hurting the exporter's potential to be HA.

Suppose you have an HA juju controller with the juju-controller charm deployed to each of the controllers. You deploy the prometheus-juju-exporter charm to the controller model and relate it to the juju-controller app. Then you get 3 exporters, one on each controller. You could think that if one of the controllers goes down, then the exporter would continue to work. But that is only the case if the down controller isn't the one specified in the controller-url config. If that one goes down, then there won't be any more metrics.

Status `active/idle -- Unit is ready` despite the exporter not running

Charm reports status active/idle despite the exporter not running.

prometheus-juju-exporter/4*  active    idle             10.11.2.135     5000/tcp  Unit is ready

Inside the unit:

ubuntu@juju-f5291e-3-lxd-28:~$ curl http://localhost:5000/metrics
curl: (7) Failed to connect to localhost port 5000: Connection refused
ubuntu@juju-f5291e-3-lxd-28:~$ systemctl status snap.prometheus-juju-exporter.prometheus-juju-exporter.service 
โ— snap.prometheus-juju-exporter.prometheus-juju-exporter.service - Service for snap application prometheus-juju-exporter.prometheus-juju-exporter
     Loaded: loaded (/etc/systemd/system/snap.prometheus-juju-exporter.prometheus-juju-exporter.service; disabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2023-01-12 14:12:38 UTC; 4min 5s ago
    Process: 17866 ExecStart=/usr/bin/snap run prometheus-juju-exporter (code=exited, status=1/FAILURE)
   Main PID: 17866 (code=exited, status=1/FAILURE)

Jan 12 14:12:25 juju-f5291e-3-lxd-28 prometheus-juju-exporter.prometheus-juju-exporter[17866]: unexpected facade EnvironUpgrader found, unable to decipher version to use
Jan 12 14:12:26 juju-f5291e-3-lxd-28 prometheus-juju-exporter.prometheus-juju-exporter[17866]: unknown facade EnvironUpgrader
Jan 12 14:12:26 juju-f5291e-3-lxd-28 prometheus-juju-exporter.prometheus-juju-exporter[17866]: unexpected facade EnvironUpgrader found, unable to decipher version to use
Jan 12 14:12:27 juju-f5291e-3-lxd-28 prometheus-juju-exporter.prometheus-juju-exporter[17866]: unknown facade EnvironUpgrader
Jan 12 14:12:27 juju-f5291e-3-lxd-28 prometheus-juju-exporter.prometheus-juju-exporter[17866]: unexpected facade EnvironUpgrader found, unable to decipher version to use
Jan 12 14:12:29 juju-f5291e-3-lxd-28 prometheus-juju-exporter.prometheus-juju-exporter[17866]: unknown facade EnvironUpgrader
Jan 12 14:12:29 juju-f5291e-3-lxd-28 prometheus-juju-exporter.prometheus-juju-exporter[17866]: unexpected facade EnvironUpgrader found, unable to decipher version to use
Jan 12 14:12:38 juju-f5291e-3-lxd-28 prometheus-juju-exporter.prometheus-juju-exporter[17866]: 2023-01-12 14:12:38,099 ERROR - Collection job resulted in error: model cache: model "f8dc82ca-ef1b-461b-80d0-36a0f36bb910" did not appear >
Jan 12 14:12:38 juju-f5291e-3-lxd-28 systemd[1]: snap.prometheus-juju-exporter.prometheus-juju-exporter.service: Main process exited, code=exited, status=1/FAILURE
Jan 12 14:12:38 juju-f5291e-3-lxd-28 systemd[1]: snap.prometheus-juju-exporter.prometheus-juju-exporter.service: Failed with result 'exit-code'.

The scrape target is also marked as down in Prometheus:

[remote-bacf2cdeae5244f68d728275e5b3683c (0/1 up)](http://10.11.2.134:9090/targets?search=#pool-remote-bacf2cdeae5244f68d728275e5b3683c)

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.