Giter VIP home page Giter VIP logo

nagiosplugin-rs's People

Contributors

ekranos avatar tatref avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nagiosplugin-rs's Issues

Where is safe_run_with_state ?

I am trying to implement a simple behaviour, were all errors would return as state Unknown instead of Critical.

    Runner::new()
        .safe_run_with_state(do_check, ServiceState::Unknown)
        .print_and_exit();

However this gives:

error[E0599]: no method named `safe_run_with_state` found for struct `Runner` in the current scope
  --> src/main.rs:47:10
   |
47 |         .safe_run_with_state(do_check, ServiceState::Unknown)
   |          ^^^^^^^^^^^^^^^^^^^ method not found in `Runner<_>`

It seems the safe_run_with_state helper and the helper.rs file have disappeared altogether (using nagiosplugin = "0.4").
I have tried doing it with on_error but was not able to find the right syntax. Any help welcome!

[RFE} Need example to call this lib

Hi
I am interested to learn how to use your library to create nagios plugins.
Can you provide a few hello-world type of examples in example directory ?

Unit of Measure in performance data

https://nagios-plugins.org/doc/guidelines.html#AEN200 states the format is
'label'=value[UOM];[warn];[crit];[min];[max]
where UOM is one of

  1. no unit specified - assume a number (int or float) of things (eg, users, processes, load averages)
  2. s - seconds (also us, ms)
  3. % - percentage
  4. B - bytes (also KB, MB, TB)
  5. c - a continous counter (such as bytes transmitted on an interface)
    There is no way to add the UOM to Resource.print_and_exit()

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.