c++ - Daemon monitoring / logging on linux (application counters) -


i'm writing daemon continuously run in background , it's thing. monitor performance , various other variables. include things web request latency, errors, number of processed items , on.

the data should available review, along graphs, reports (averages, outliers) , alerts when limits exceeded.

performance counters on windows closest thing find. can define own counters , access them code.

note i'm not looking "performance" counters named, it's more application counters - i.e. don't care number of executed instructions , cache misses, custom counters. stackoverflow questions similar responses missed point here: application counters in linux? (and osx?)

i've looked @ cacti (and alternatives), seem run script on schedule provides data. means have store counters in daemon, along thread waiting kind of ipc call. need create second application/script connect via ipc interface , retrieve stored values.

is there better way? c library make possible increment counter single function call , it'll automatically processed via frontend?

statsd place start collect metrics.

statsd let send counters directly application without incurring significant overhead. code generates counters executes , need not keep track of in code.

if want package has all-in-one (but no persistence), can use pup

if need persistence , graphing may want @ graphite.

graphite connect statsd , let graph of counters generate. it's lightweight , combination arguable easier deploy , maintain nagios (which closer cacti in terms of deployment , learning curve).

if want more integrated persistence , api, there number of services graphing you. i've limited myself open-source software here.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -