Skip to content

Instantly share code, notes, and snippets.

@slumos
Created November 4, 2011 18:07
Show Gist options
  • Select an option

  • Save slumos/1340040 to your computer and use it in GitHub Desktop.

Select an option

Save slumos/1340040 to your computer and use it in GitHub Desktop.
Find out-of-date ganglia metrics
~ 0% nc web-012 8649 | xml sel -T -t -m "/GANGLIA_XML/CLUSTER/HOST/METRIC[@NAME='nginx_status_requests' and @TN > 60]" -s A:T:L "parent::HOST/@NAME" -v "concat(parent::HOST/@NAME,' ',@NAME,' ',@TN)" -n
web-025.example.com nginx_status_requests 1104
web-026.example.com nginx_status_requests 1104
web-027.example.com nginx_status_requests 1104
web-028.example.com nginx_status_requests 1104
web-032.example.com nginx_status_requests 1155
~ 0% nc web-012 8649 | xml sel -T -t -m "/GANGLIA_XML/CLUSTER/HOST/METRIC[@TMAX > 0 and @TN > @TMAX]" -s A:T:L "parent::HOST/@NAME" -v "concat(parent::HOST/@NAME,' ',@NAME,' ',@TN,' > ',@TMAX)" -n
web-001.example.com disk_total 2507 > 1200
web-002.example.com load_one 72 > 70
web-003.example.com disk_total 1500 > 1200
web-005.example.com load_one 83 > 70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment