aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2014-11-28 10:20:18 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2014-11-28 10:20:18 +0200
commit38cd993057ababdbf6b32aab35f834363647b7d8 (patch)
treebd8f576b2a833b5a597b7a8dd7309f5ee5413180 /src
parent443bc6290a6a90b2c74612d7d68945e375af0ec3 (diff)
downloadvarnish-mib-38cd993057ababdbf6b32aab35f834363647b7d8.tar.gz
varnish-mib-38cd993057ababdbf6b32aab35f834363647b7d8.tar.bz2
Remove banTableTimeout oid.
Diffstat (limited to 'src')
-rw-r--r--src/VARNISH-MIB.txt13
-rw-r--r--src/ban.c14
-rw-r--r--src/varnish-mib.814
-rw-r--r--src/varnish_mib.mib2c8
4 files changed, 6 insertions, 43 deletions
diff --git a/src/VARNISH-MIB.txt b/src/VARNISH-MIB.txt
index bb6075d..71556c4 100644
--- a/src/VARNISH-MIB.txt
+++ b/src/VARNISH-MIB.txt
@@ -17,20 +17,20 @@ IMPORTS
17 InetAddressIPv4, InetAddressIPv6, InetPortNumber, 17 InetAddressIPv4, InetAddressIPv6, InetPortNumber,
18 FROM INET-ADDRESS-MIB 18 FROM INET-ADDRESS-MIB
19 OBJECT-GROUP, MODULE-COMPLIANCE 19 OBJECT-GROUP, MODULE-COMPLIANCE
20 FROM SNMPv2-CONF; 20 FROM SNMPv2-CONF;
21 21
22varnishMIB MODULE-IDENTITY 22varnishMIB MODULE-IDENTITY
23 LAST-UPDATED "201411280136Z" 23 LAST-UPDATED "201411280837Z"
24 ORGANIZATION "Shared Autonomous sYstems" 24 ORGANIZATION "Shared Autonomous sYstems"
25 CONTACT-INFO "Morten Hermanrud <mhe@say.no> 25 CONTACT-INFO "Morten Hermanrud <mhe@say.no>
26 Sergey Poznyakoff <gray@gnu.org> 26 Sergey Poznyakoff <gray@gnu.org>
27 " 27 "
28 DESCRIPTION 28 DESCRIPTION
29 "This MIB module defines objects for Varnish reverse web proxy." 29 "This MIB module defines objects for Varnish reverse web proxy."
30 REVISION "201411280136Z" 30 REVISION "201411280837Z"
31 DESCRIPTION 31 DESCRIPTION
32 "Second revision." 32 "Second revision."
33 ::= { varnish 0 } 33 ::= { varnish 0 }
34 34
35varnish OBJECT IDENTIFIER ::= { enterprises 33043 6 1 } 35varnish OBJECT IDENTIFIER ::= { enterprises 33043 6 1 }
36client OBJECT IDENTIFIER ::= { varnish 1 } 36client OBJECT IDENTIFIER ::= { varnish 1 }
@@ -780,21 +780,12 @@ banExpression OBJECT-TYPE
780 MAX-ACCESS read-only 780 MAX-ACCESS read-only
781 STATUS current 781 STATUS current
782 DESCRIPTION 782 DESCRIPTION
783 "VCL expression of the ban." 783 "VCL expression of the ban."
784 ::= { varnishBanEntry 4 } 784 ::= { varnishBanEntry 4 }
785 785
786banTableTimeout OBJECT-TYPE
787 SYNTAX Unsigned32
788 MAX-ACCESS read-write
789 STATUS current
790 DESCRIPTION
791 "If banTable content is cached, this variable keeps
792 the time in seconds after which the table is reloaded.
793 Setting it changes that value."
794 ::= { agent 1 }
795-- 786--
796-- Groups and Compliance 787-- Groups and Compliance
797-- 788--
798varnishConfs OBJECT IDENTIFIER ::= { varnish 100 } 789varnishConfs OBJECT IDENTIFIER ::= { varnish 100 }
799varnishGroups OBJECT IDENTIFIER ::= { varnishConfs 1 } 790varnishGroups OBJECT IDENTIFIER ::= { varnishConfs 1 }
800varnishCompl OBJECT IDENTIFIER ::= { varnishConfs 2 } 791varnishCompl OBJECT IDENTIFIER ::= { varnishConfs 2 }
diff --git a/src/ban.c b/src/ban.c
index 72aa506..8d48db2 100644
--- a/src/ban.c
+++ b/src/ban.c
@@ -96,26 +96,12 @@ varnish_mib_timeout_parser(const char *token, char *line, unsigned *retval)
96void 96void
97varnish_ban_table_timeout_parser(const char *token, char *line) 97varnish_ban_table_timeout_parser(const char *token, char *line)
98{ 98{
99 varnish_mib_timeout_parser(token, line, &banTable_timeout); 99 varnish_mib_timeout_parser(token, line, &banTable_timeout);
100} 100}
101 101
102int
103varnish_ban_table_timeout_set(netsnmp_agent_request_info *reqinfo,
104 netsnmp_request_info *requests,
105 struct VSM_data *vd)
106{
107 if (*requests->requestvb->val.integer < 0 ||
108 *requests->requestvb->val.integer > UINT_MAX)
109 return SNMP_ERR_BADVALUE;
110 DEBUGMSGTL(("varnish_ban", "setting banTable timeout %ld\n",
111 *requests->requestvb->val.integer));
112 banTable_timeout = *requests->requestvb->val.integer;
113 return SNMP_ERR_NOERROR;
114}
115
116/* 102/*
117 * create a new row in the table 103 * create a new row in the table
118 */ 104 */
119static struct banTable_entry * 105static struct banTable_entry *
120create_entry(netsnmp_tdata *table_data, long idx, struct banTable_entry *ent) 106create_entry(netsnmp_tdata *table_data, long idx, struct banTable_entry *ent)
121{ 107{
diff --git a/src/varnish-mib.8 b/src/varnish-mib.8
index c2d37cd..05fa177 100644
--- a/src/varnish-mib.8
+++ b/src/varnish-mib.8
@@ -51,15 +51,12 @@ The following configuration statements are available:
51To create \fBbanTable\fR (see below), \fBvarnish_mib\fR connects to 51To create \fBbanTable\fR (see below), \fBvarnish_mib\fR connects to
52\fBvarnish\fR administration port and issues the \fBban.list\fR 52\fBvarnish\fR administration port and issues the \fBban.list\fR
53command. To minimize the performance impact, the information obtained 53command. To minimize the performance impact, the information obtained
54is cached for a predefined amount of time (60 seconds by default). 54is cached for a predefined amount of time (60 seconds by default).
55This amount (in seconds) is configured by \fBvarnishBanTableTimeout\fR 55This amount (in seconds) is configured by \fBvarnishBanTableTimeout\fR
56statement. 56statement.
57
58It can also be set remotely by assigning new value to the
59\fBbanTableTimeout\fR oid.
60.TP 57.TP
61\fBvarnishCLIPortTimeout\fR \fINUMBER\fR 58\fBvarnishCLIPortTimeout\fR \fINUMBER\fR
62Sets timeout for I/O operations with Varnish administrative port. 59Sets timeout for I/O operations with Varnish administrative port.
63Default is 5 seconds. 60Default is 5 seconds.
64.TP 61.TP
65\fBvarnishBackendTableTimeout\fR \fINUMBER\fR 62\fBvarnishBackendTableTimeout\fR \fINUMBER\fR
@@ -332,20 +329,17 @@ in the varnish cache affected by that ban.
332VCL expression of the ban. 329VCL expression of the ban.
333.RE 330.RE
334 331
335Notice that for performance reasons, the ban table is cached, so the 332Notice that for performance reasons, the ban table is cached, so the
336total number of rows in the \fBbanTable\fR may diverge from the value 333total number of rows in the \fBbanTable\fR may diverge from the value
337of \fBbansTotal\fR variable. The default update interval is 60 334of \fBbansTotal\fR variable. The default update interval is 60
338seconds. It can be configured either in the \fBsnmpd.conf\fR file 335seconds. It can be configured in the \fBsnmpd.conf\fR file
339(see the \fBvarnishBanTableTimeout\fR statement above), or via 336(see the \fBvarnishBanTableTimeout\fR statement above).
340the \fBbanTableTimeout\fR variable.
341.SS Branch \(dqagent\(dq 337.SS Branch \(dqagent\(dq
342.TP 338The \fBagent\fR branch is reserved for OIDs for
343.B banTableTimeout 339implementation-specific management. It is not used currently.
344Update interval for the \fBbanTable\fR cache. If set, it takes effect
345immediately.
346.SH "SEE ALSO" 340.SH "SEE ALSO"
347.BR snmpd.conf (5), 341.BR snmpd.conf (5),
348.BR snmpd (8), 342.BR snmpd (8),
349.BR varnish (7), 343.BR varnish (7),
350.BR varnishstat (1). 344.BR varnishstat (1).
351.SH AUTHORS 345.SH AUTHORS
diff --git a/src/varnish_mib.mib2c b/src/varnish_mib.mib2c
index c120b0e..5d9cc6b 100644
--- a/src/varnish_mib.mib2c
+++ b/src/varnish_mib.mib2c
@@ -98,16 +98,12 @@ $vars{'varnish_translate'} = sub {
98 bansLurkerTestTested => [ 'MAIN', 'bans_lurker_tests_tested' ], 98 bansLurkerTestTested => [ 'MAIN', 'bans_lurker_tests_tested' ],
99 bansLurkerObjKilled => [ 'MAIN', 'bans_lurker_obj_killed' ], 99 bansLurkerObjKilled => [ 'MAIN', 'bans_lurker_obj_killed' ],
100 bansDups => [ 'MAIN', 'bans_dups' ], 100 bansDups => [ 'MAIN', 'bans_dups' ],
101 bansLurkerContention => [ 'MAIN', 'bans_lurker_contention' ], 101 bansLurkerContention => [ 'MAIN', 'bans_lurker_contention' ],
102 bansPersistedBytes => [ 'MAIN', 'bans_persisted_bytes' ], 102 bansPersistedBytes => [ 'MAIN', 'bans_persisted_bytes' ],
103 bansPersistedFragmentation => [ 'MAIN', 'bans_persisted_fragmentation' ], 103 bansPersistedFragmentation => [ 'MAIN', 'bans_persisted_fragmentation' ],
104
105 banTableTimeout => [ 'VAR', 'banTable_timeout',
106 { varnish_set_action => 'varnish_ban_table_timeout_set'
107 } ],
108 104
109 ); 105 );
110 106
111 my $r = $trans{$name}; 107 my $r = $trans{$name};
112 if (!defined($r)) { 108 if (!defined($r)) {
113 print STDERR "no translation for $name!\n"; 109 print STDERR "no translation for $name!\n";
@@ -185,16 +181,12 @@ int varnish_ban(netsnmp_agent_request_info *reqinfo,
185int varnish_mib_timeout_parser(const char *token, char *line, 181int varnish_mib_timeout_parser(const char *token, char *line,
186 unsigned *retval); 182 unsigned *retval);
187 183
188void varnish_ban_table_timeout_parser(const char *token, char *line); 184void varnish_ban_table_timeout_parser(const char *token, char *line);
189void varnish_vcli_timeout_parser(const char *token, char *line); 185void varnish_vcli_timeout_parser(const char *token, char *line);
190 186
191int varnish_ban_table_timeout_set(netsnmp_agent_request_info *reqinfo,
192 netsnmp_request_info *requests,
193 struct VSM_data *vd);
194
195void varnish_backend_table_timeout_parser(const char *token, char *line); 187void varnish_backend_table_timeout_parser(const char *token, char *line);
196 188
197@open ${name}@ 189@open ${name}@
198/* THIS FILE IS GENERATED AUTOMATICALLY. PLEASE DO NOT EDIT. */ 190/* THIS FILE IS GENERATED AUTOMATICALLY. PLEASE DO NOT EDIT. */
199 191
200#include "varnish_mib.h" 192#include "varnish_mib.h"

Return to:

Send suggestions and report system problems to the System administrator.