8000 Adding more parameters to services by hron84 · Pull Request #6 · karmi/monittr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Adding more parameters to services #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hron84
Copy link
Contributor
@hron84 hron84 commented Feb 10, 2013

Monit's xml contains more parameters than we already support, it would
be nice if we can support more info about system and services.

New parameters:

  • System:
    • os: Operating system
    • osversion: Operating system version
    • arch: Machine architecture
    • cputotal: Total nr. of CPUs
    • memtotal: Total size of memory (in KB)
    • swaptotal: Total size of swap area (in KB, nil if not supported)
  • Filesystem:
    • inode_percent, inode_usage, inode_total: Same values as block, but
      for inodes
  • Process:
    • total_memory: Memory usage of process and all children proces
    • total_cpu: CPU usage of process and all children process
    • response_time: monit supports checking a service within a process
      checking, and adds response time if it's available (or nil if not)

I added tests for these values too, and fixed formatting of source where
it is needed. All tests are passing

Monit's xml contains more parameters than we already support, it would
be nice if we can support more info about system and services.

New parameters:

 * System:
   * os: Operating system
   * osversion: Operating system version
   * arch: Machine architecture
   * cputotal: Total nr. of CPUs
   * memtotal: Total size of memory (in KB)
   * swaptotal: Total size of swap area (in KB, nil if not supported)
 * Filesystem:
   * inode_percent, inode_usage, inode_total: Same values as block, but
     for inodes
 * Process:
   * total_memory: Memory usage of process and all children proces
   * total_cpu: CPU usage of process and all children process
   * response_time: monit supports checking a service within a process
     checking, and adds response time if it's available (or nil if not)

I added tests for these values too, and fixed formatting of source where
it is needed. All tests are passing
@hron84
Copy link
Contributor Author
hron84 commented Feb 10, 2013

For pass tests on Travis, see #5 too.

@karmi
Copy link
Owner
karmi commented Feb 10, 2013

Are you sure all the parameters are available on current/most used Monit versions? I know there are some incompatibilities/inconsistencies...

@hron84
Copy link
Contributor Author
hron84 commented Feb 11, 2013

@karmi I checked it against Debian Lenny / Monit 4.10.1.

Filesystem: inode percent values are missing
Process: big total values are missing
System: all //platform related values are missing.

However I thinking on two thing:

  • Latest Monit version is 5.5. Are we sure to support a quite old systems? Monit does not have too much dependency, so it can be compiled on a very-very old architecture too - I ported Monit 5.4 to Debian Lenny without any problem -, so I do not think there is a real problem. TildeSlash provides an up-to-date package for bunch of architectures too.
  • If we want really support these old versions, we can make some guessing logic, e.g. where the percent value is missing, we can provide a method what calculates these values based on a free/used value.

My point is offer all new things - if somebody has an older monit, he could get nil - but nil is not an exception. I think clients can handle nils same way as we handle them in the sinatra application (displaying N/A).

I think current distributions does not provide monit older than 5.2 - and these things are supported quite long time ago. However, if anyone wants newer monit - he can recompile monit from source or grab TildeSlash binaries.

But you know what do you want... this is just my 2 cents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0