Adding more parameters to services #6

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
@hron84
Contributor

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

hron84 added some commits Feb 9, 2013

Adding more parameters to services
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

This comment has been minimized.

Show comment Hide comment
@hron84

hron84 Feb 10, 2013

Contributor

For pass tests on Travis, see #5 too.

Contributor

hron84 commented Feb 10, 2013

For pass tests on Travis, see #5 too.

@karmi

This comment has been minimized.

Show comment Hide comment
@karmi

karmi Feb 10, 2013

Owner

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

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

This comment has been minimized.

Show comment Hide comment
@hron84

hron84 Feb 11, 2013

Contributor

@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.

Contributor

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