Skip to content
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

Implement ContainerPilot telemetry #3

Open
misterbisson opened this issue Apr 18, 2016 · 0 comments
Open

Implement ContainerPilot telemetry #3

misterbisson opened this issue Apr 18, 2016 · 0 comments

Comments

@misterbisson
Copy link
Contributor

misterbisson commented Apr 18, 2016

ContainerPilot 2.0 introduced a telemetry feature that would be very useful for monitoring this application.

The system's free RAM as a decimal from 0-1 (excluding filesystem buffers and cache):

echo "scale=2; ( $(free -m | awk '/Mem/{print $3}') - $(free -m | awk '/Mem/{print $6}') - $(free -m | awk '/Mem/{print $7}') ) / $(free -m | awk '/Mem/{print $2}')" | bc

EDIT: this is much shorter and probably more efficient:

free -m | awk 'NR==2 {printf("%.2f\n", ($3 - $6 - $7) / $2 )}'

More specific stats can be found from Memcached itself:

$ echo stats | nc 127.0.0.1 11211 
STAT pid 1222
STAT uptime 11066484
STAT time 1460951850
STAT version 1.4.4
STAT pointer_size 64
STAT rusage_user 18140.265260
STAT rusage_system 36461.835958
STAT curr_connections 24
STAT total_connections 91434
STAT connection_structures 182
STAT cmd_get 694913325
STAT cmd_set 757666708
STAT cmd_flush 0
STAT get_hits 599513796
STAT get_misses 95399529
STAT delete_misses 13041164
STAT delete_hits 429308
STAT incr_misses 0
STAT incr_hits 16047
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 486625034028
STAT bytes_written 1339052653983
STAT limit_maxbytes 67108864
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 4
STAT conn_yields 0
STAT bytes 60768161
STAT curr_items 58347
STAT total_items 190874836
STAT evictions 167781776
END

From those, these items look most promising

  • bytes / limit_maxbytes
  • evictions (which is an internal counter, but would need to be presented as a gauge...or turned into a more useful counter)
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

No branches or pull requests

1 participant