Permalink
Browse files

Add Varnish 3.0 metrics

  • Loading branch information...
1 parent dcd01ec commit 093a5758b8b0fdffd06375ec576cadbff96ed360 @vvuksan vvuksan committed Jan 11, 2013
Showing with 193 additions and 0 deletions.
  1. +193 −0 varnish/python_modules/varnish.py
@@ -824,6 +824,199 @@ def metric_init(lparams):
"description": "Client uptime",
}))
+ ##############################################################################
+
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'backend_retry',
+ "call_back" : get_delta,
+ "units" : "retries/s",
+ "description": "Backend conn. retry",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'dir_dns_cache_full',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "DNS director full dnscache",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'dir_dns_failed',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "DNS director failed lookups",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'dir_dns_hit',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "DNS director cached lookups hit",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'dir_dns_lookups',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "DNS director lookups",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'esi_warnings',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "ESI parse warnings (unlock)",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'fetch_1xx',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "Fetch no body (1xx)",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'fetch_204',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "Fetch no body (204)",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'fetch_304',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "Fetch no body (304)",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_ban',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "N total active bans",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_ban_add',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "N new bans added",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_ban_retire',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "N old bans deleted",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_ban_obj_test',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "N objects tested",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_ban_re_test',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "N regexps tested against",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_ban_dups',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "N duplicate bans removed",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_ban_add',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "N new bans added",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_ban_dups',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "N duplicate bans removed",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_ban_obj_test',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "N objects tested",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_ban_re_test',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "N regexps tested against",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_ban_retire',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "N old bans deleted",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_gunzip',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "Gunzip operations",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_gzip',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "Gzip operations",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_vbc',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "N struct vbc",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_waitinglist',
+ "call_back" : get_delta,
+ "units" : "/s",
+ "description": "N struct waitinglist",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_wrk_lqueue',
+ "call_back" : get_value,
+ "units" : "",
+ "description": "work request queue length",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'n_wrk_queued',
+ "call_back" : get_value,
+ "units" : "req",
+ "description": "N queued work requests",
+ }))
+
+ descriptors.append( create_desc(Desc_Skel, {
+ "name" : NAME_PREFIX + 'vmods',
+ "call_back" : get_value,
+ "units" : "vmods",
+ "description": "Loaded VMODs",
+ }))
+
+
return descriptors

0 comments on commit 093a575

Please sign in to comment.