-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

guys-

we talked about this before and i wanted to get some feedback if you have 
the time.  i _think_ we all agreed that S-expressions would be the best 
format for messages on the wire.  here is what i propose.. let me know if 
you see any problems with it... <required> [optional]

(<version> [started]
  ([hostname] [ip])
  ((<branch>) [type] [units] [trend]))
  ((<metric name> <metric value>)...(<metric name> <metric value>))
)

version = message format version
started = the time monitoring was started on the host (timestamp)
branch  = a space limited list (e.g. (processes 1024 cpu) )
type    = string | number | float  (default number)
units   = the units of measure "%" "kb" etc
trend   = constant | gauge | counter

here are some examples...

/* A heartbeat message (only 14 bytes) */
(1 1054323715)   

/* A typical message from a registered monitoring module (61 bytes) */
(1()((cpu))((user 10.0)(system 10.0)(nice 10.0)(idle 90.0)))

since the host info is empty, it is taken from the ip header/ dns.. or the
internal host cache (just like we do now).  the "type" "units" and "trend"  
are retrieved from the module registry.

/* An explicit message from an unregistered source (gmetric) (85 bytes) */
(1()((cpu) float % gauge)((user 10.0)(system 10.0)(nice 10.0)(idle 90.0)))

24 bytes larger because we have to since the metric attribute information.

/* A super explicit message with explicit host info (104 bytes) */
(1("compute-node-0-0" "10.0.0.5")
  ((cpu) float % gauge)
  ((user 10.0)(system 10.0)(nice 10.0)(idle 90.0))
)

this format is necessary if we are going to have one host speak for 
another.  for example, if we do persistent connections on gmetad.. we need 
to tell the remote gmetad the hostname to save the data under (if the 
remote gmetad took the data from the ip header.. then all metrics would 
show up under the ip/name of the gmetad source).

... do you like the format?  do you see any flaws in the design?  let me 
know soon because i'm going to write the wire code next.

also, you guys have been really more quiet lately than usual.  i hope 
you're all not working too hard.  i hope you all have a good weekend.

- -matt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+17fHVmIXr0CKtmERAhsnAKCJlM2sphHTuHJjxUvJvA5j9Nx3JACcDC9l
QI5dztBw2ltAm9pZ4hwBSWY=
=xCWo
-----END PGP SIGNATURE-----


Reply via email to