Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    bpetit
    @bpetit
    Depends on what you want to do with the data afterwards
    René Ribaud
    @uggla
    @demeringo , interesting use case. I think Riemann is a good candidate for this ! Riemann is working with a push model. So you can imagine the following pipeline: (ci image with scaphandre) --> (Riemann) --> (Influx DB or ES)
    Then you can see live data in the Riemann dashboard and TS data (history) in influx with Grafana or ES with (Grafana ou Kibana)
    René Ribaud
    @uggla
    By the way I could slightly modify Scaphandre to add metadata (keys/values) to Riemann, so your scaph client could send these metadata (build id, etc...) alongside with power/process values.
    olivier de Meringo
    @demeringo
    @uggla @bpetit great idea ! I did not think about using Riemann, the push model is interesting in this case. I will try it.
    bpetit
    @bpetit
    You can also use warp10, or prometheus with a pushgateway, if that's the push mode you are looking for. Just to mention :)
    René Ribaud
    @uggla
    @demeringo , yes I think Riemann is underestimated. @bpetit I did not know about the pushgateway, do you speak about this project https://github.com/prometheus/pushgateway ?
    René Ribaud
    @uggla
    https://prometheus.io/docs/instrumenting/pushing/ seems more complex to use as it will required to send scaphandre metrics to the prom gateway with another program or script. Unless if I'm wrong or use Riemann https://riemann.io/api/riemann.prometheus.html. :) (we can not beat Riemann ! :D )
    bpetit
    @bpetit
    yes you're right, we did not develop the feature to send metrics to the push gateway :)
    René Ribaud
    @uggla
    Anyway warp10 is the simplest solution. As it requires only to setup warp10.
    To note that vector (https://vector.dev/) can be interesting too. By the way it seems datadog acquired it.
    bpetit
    @bpetit

    Hi there !

    Short but kind of urgent message in french :

    Le magazine https://www.programmez.com/ nous demande si on peut écrire un article (en français) pour présenter scaphandre. L'idée serait de décrire un use case standard de surveillance de la conso d'une application en développement, de version en version. Un dashboard grafana, un scénario gatling ou équivalent et quelques modifs dans la base de code d'une app pour donner un exemple de réduction de conso lors d'un test de charge, dans l'idée.

    La mauvaise nouvelle c'est que ce serait pour le 5 août (semaine prochaine). C'est ma faute j'ai laissé trainé et maintenant c'est le rush ^^

    Si quelqu'un a un use case en stock sur son laptop et veut bien en parler dans un article, qu'il/elle me fasse signe !

    Merci !

    (pas de rémunération prévue, mais toute la gratiture de la part des contributeurs de scaphandre et j'offre un verre sans probleme si on est dans le même coin ^^)
    (PS: vous pouvez en profiter pour parler au nom de votre boite, ou de vous meme si vous etes freelance et vous faire un peu de pub, du moment que vous donnez les infos sur le projet)

    René Ribaud
    @uggla
    @bpetit , arf chaud en terme de temps dispo. Surtout que je viens juste de voir le msg. J'ai peut être qq chose qui pourrait être utile. J'ai en préparation pour une conf du code qui calcule des nombres premiers et cela me permet de debunker certaines idées reçus. Bref on pourrait imaginer de lancer le truc avec un algo naif qui devrait donc consommer un max de power (car beaucoup de cpu). Puis ensuite de lancer la version avec un meilleur algo (Crible d'Ératosthène) et voir que cela consomme moins. Le use case est pas super réaliste et fou, mais l'idée serait de montrer la corrélation efficacité algo et power / usage de la batterie. Et que monitorer la conso permet de trouver se genre de chose.... Par contre ça me semble un peu chaud pour fournir ça d'ici à Jeudi avec la semaine qui arrive. Après il y a une chance, c'est que Rose est chez ses grand parents donc j'ai un peu plus de temps libre cette semaine. Dis moi vite si ça le ferait ou si tu as des propositions pour améliorer le sujet, et si on peut prévoir une session pour avancer/relire/améliorer le truc si ça te semble une bonne idée.
    4 replies
    Ross Fairbanks
    @rossf7
    Hi @bpetit just to say I'm back after my break. So if I can help with the kubernetes integration just let me know. Cheers Ross
    3 replies
    bpetit
    @bpetit
    Hi ! I'm back after a short break. PRs should be moving on soon ! Thanks a lot for the work you have done so far on those PRs ! :)
    1 reply
    bpetit
    @bpetit

    Hi !

    @rossf7 did you see this ticket ? https://github.com/hubblo-org/scaphandre/issues/122#issuecomment-914061716

    It seems to me the only way to install scaphandre with helm for now is to use the local helm folder as the chart right ?

    3 replies
    bpetit
    @bpetit
    Solved, don't mind my last message :)
    bpetit
    @bpetit

    Hi there ! I have a Rust question for anyone able to answer it :)

    Here is my code :

    let top_consumers = consumers
                .iter()
                .filter_map(|(process, _value)|{
                    if let Some(metric) = metrics.iter().find(|x| {
                        x.name == "scaph_process_power_consumption_microwatts" 
                        && process.pid == x.attributes.get("pid").unwrap().parse::<i32>().unwrap()
                    }) {
                        Some(
                            Consumer {
                                exe: PathBuf::from(metric.attributes.get("exe").unwrap()),
                                pid: process.pid,
                                consumption: format!("{}", metric.metric_value).parse::<f32>().unwrap(),
                                timestamp: metric.timestamp.as_secs_f64(),
                            }
                        )
                    } else { None }
                })
                .collect::<Vec<_>>();

    I want to to isolate Process items (from the consumers vec) with their Metric cousin (from the metrics vec) and finally have a vec containing Consumer items with data from the Process and the Metric.

    This code compiles, but clippy gives me this warning :

    warning: manual implementation of `Option::map`
       --> src/exporters/json.rs:196:17
        |
    196 | /                 if let Some(metric) = metrics.iter().find(|x| {
    197 | |                     x.name == "scaph_process_power_consumption_microwatts" 
    198 | |                     && process.pid == x.attributes.get("pid").unwrap().parse::<i32>().unwrap()
    199 | |                 }) {
    ...   |
    207 | |                     )
    208 | |                 } else { None }
        | |_______________________________^
        |
        = note: `#[warn(clippy::manual_map)]` on by default
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
    help: try this
        |
    196 |                 metrics.iter().find(|x| {
    197 |                     x.name == "scaph_process_power_consumption_microwatts" 
    198 |                     && process.pid == x.attributes.get("pid").unwrap().parse::<i32>().unwrap()
    199 |                 }).map(|metric| Consumer {
    200 |                             exe: PathBuf::from(metric.attributes.get("exe").unwrap()),
    201 |                             pid: process.pid,
      ...
    
    warning: 1 warning emitted

    I'd like to make him happy but I struggle to find a similar way to do that and avoid that warning :)

    I need to return either Some or None for filter_map, so using map as proposed by clippy doesn't work...

    any advice @uggla @PierreRust or someone else ? :)

    (its for PR #113 by the way :P)
    bpetit
    @bpetit
    It seems I was just overthinking the requirements of filter_map, the answer is there: https://users.rust-lang.org/t/trapped-in-clippys-warning-manual-implementation-of-option-map/65118/4 :)
    René Ribaud
    @uggla
    Du coup je comprends que c'est ok ? Tu confirmes ?
    1 reply
    bpetit
    @bpetit
    Hi there !

    I'd love a second review on that PR : hubblo-org/scaphandre#113

    Thanks a lot to the brave contributor who'd have the time to do it :)

    bpetit
    @bpetit

    Hi !

    Some news.
    I'm about to release the v0.4.
    I've added the Hacktoberfest topic on GPU, MacOS and ARM features, let's see if it brings new contributors !

    René Ribaud
    @uggla
    Hey cool.
    I need to check what you have put inside this 0.4. Will you be able to look at my PR ?
    4 replies
    bpetit
    @bpetit
    @rossf7 I've published a patch version with k8s-sync up to date. I'm building the docker image for scaphandre, the latest will include your fix.
    Martin Simon
    @barnumbirr
    5 replies
    shall I open an issue/PR?
    julianlen
    @julianlen
    Hi guys! How are you doing? I'm trying to calculate the carbon footprint of software on an AWS instance (not a bare metal one). Is this the right tool?
    3 replies
    Joel Takvorian
    @jotak
    hello / bonjour,
    14 replies
    Johnny Yeng
    @a2902793_gitlab
    Hi, newbie using scaphandre, just wanted to ask some questions regarding collecting qemu metrics.
    I've successfully deployed a functional stack with prometheus and grafana all running. I have four VMs using qemu, each running scaphandre --vm prometheus and the host running scaphandre qemu.
    However, the graph is always a flat line and I cannot see any wattage change, I've also noticed that sometimes the <ip>:8080/metrics page sometimes loses some information. I'll post some images here later, just asking if anyone successfully got qemu exporter working correctly. Thanks guys!
    3 replies
    frederikros
    @frederikros:matrix.org
    [m]
    Hi, I trying to use scaphandre with helm charts. So far i work greats and is able to get power information for all pods running on one namespace. However can't seem to find a way to get data into prometheus from multiple namespaces in Kubernetes. Is this something that is support?
    5 replies