diff options
Diffstat (limited to 'src/varnish_mib.mib2c')
-rw-r--r-- | src/varnish_mib.mib2c | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/src/varnish_mib.mib2c b/src/varnish_mib.mib2c index a458723..155df42 100644 --- a/src/varnish_mib.mib2c +++ b/src/varnish_mib.mib2c @@ -100,3 +100,19 @@ $vars{'varnish_translate_table'} = { bansPersistedFragmentation => [ 'DICT', 'MAIN.bans_persisted_fragmentation' ], - + + objectsCount => [ 'DICT', 'MAIN.n_object' ], + objectsVampire => [ 'DICT', 'MAIN.n_vampireobject' ], + objectsCore => [ 'DICT', 'MAIN.n_objectcore' ], + objectsHead => [ 'DICT', 'MAIN.n_objecthead' ], + objectsExpired => [ 'DICT', 'MAIN.n_expired' ], + objectsLRUNuked => [ 'DICT', 'MAIN.n_lru_nuked' ], + objectsLRUMoved => [ 'DICT', 'MAIN.n_lru_moved' ], + objectsPurges => [ 'DICT', 'MAIN.n_purges' ], + objectsObjPurged => [ 'DICT', 'MAIN.n_obj_purged' ], + objectsGzip => [ 'DICT', 'MAIN.n_gzip' ], + objectsGunzip => [ 'DICT', 'MAIN.n_gunzip' ], + + vclTotal => [ 'DICT', 'MAIN.n_vcl' ], + vclAvail => [ 'DICT', 'MAIN.n_vcl_avail' ], + vclDiscard => [ 'DICT', 'MAIN.n_vcl_discard' ], + vclFail => [ 'DICT', 'MAIN.vcl_fail' ], }; @@ -239,2 +255,3 @@ varnish_get_vsm_data() @foreach $i scalar@ +/* COMMX $i */ @startperl@ @@ -242,2 +259,3 @@ varnish_get_vsm_data() @endperl@ +@if $varnish_type ne 'NULL'@ $varnish_if @@ -304,6 +322,6 @@ handle_$i(netsnmp_mib_handler *handler, @end@ - @elsif $varnish_type eq 'NULL'@ + @elsif $varnish_type eq 'NUMBER'@ { @if $i.type eq 'ASN_COUNTER64'@ - struct counter64 ctr = { 0, 0}; + struct counter64 ctr = { ($varnish_member>>32)&0xffffffff, ($varnish_member)&0xffffffff }; snmp_set_var_typed_value(requests->requestvb, $i.type, @@ -312,3 +330,3 @@ handle_$i(netsnmp_mib_handler *handler, @else@ - uint64_t val; + uint64_t val = $varnish_member; snmp_set_var_typed_value(requests->requestvb, $i.type, @@ -390,2 +408,3 @@ $varnish_endif @end@ +@end@ @@ -576,2 +595,3 @@ init_$modulename(void) @endperl@ + @if $varnish_type ne 'NULL'@ $varnish_if @@ -579,2 +599,3 @@ $varnish_if $varnish_endif + @end@ @end@ @@ -603,2 +624,3 @@ $varnish_endif @endperl@ + @if $varnish_type ne 'NULL'@ $varnish_if @@ -614,3 +636,4 @@ $varnish_if )); -$varnish_endif +$varnish_endif + @end@ @end@ |