diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/VARNISH-MIB.txt | 13 | ||||
-rw-r--r-- | src/ban.c | 14 | ||||
-rw-r--r-- | src/varnish-mib.8 | 14 | ||||
-rw-r--r-- | src/varnish_mib.mib2c | 8 |
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 | |||
@@ -20,14 +20,14 @@ IMPORTS | |||
20 | FROM SNMPv2-CONF; | 20 | FROM SNMPv2-CONF; |
21 | 21 | ||
22 | varnishMIB MODULE-IDENTITY | 22 | varnishMIB 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 } |
@@ -783,15 +783,6 @@ banExpression OBJECT-TYPE | |||
783 | "VCL expression of the ban." | 783 | "VCL expression of the ban." |
784 | ::= { varnishBanEntry 4 } | 784 | ::= { varnishBanEntry 4 } |
785 | 785 | ||
786 | banTableTimeout 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 | -- |
@@ -99,20 +99,6 @@ varnish_ban_table_timeout_parser(const char *token, char *line) | |||
99 | varnish_mib_timeout_parser(token, line, &banTable_timeout); | 99 | varnish_mib_timeout_parser(token, line, &banTable_timeout); |
100 | } | 100 | } |
101 | 101 | ||
102 | int | ||
103 | varnish_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 | */ |
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 | |||
@@ -54,9 +54,6 @@ command. To minimize the performance impact, the information obtained | |||
54 | is cached for a predefined amount of time (60 seconds by default). | 54 | is cached for a predefined amount of time (60 seconds by default). |
55 | This amount (in seconds) is configured by \fBvarnishBanTableTimeout\fR | 55 | This amount (in seconds) is configured by \fBvarnishBanTableTimeout\fR |
56 | statement. | 56 | statement. |
57 | |||
58 | It 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 |
62 | Sets timeout for I/O operations with Varnish administrative port. | 59 | Sets timeout for I/O operations with Varnish administrative port. |
@@ -335,14 +332,11 @@ VCL expression of the ban. | |||
335 | Notice that for performance reasons, the ban table is cached, so the | 332 | Notice that for performance reasons, the ban table is cached, so the |
336 | total number of rows in the \fBbanTable\fR may diverge from the value | 333 | total number of rows in the \fBbanTable\fR may diverge from the value |
337 | of \fBbansTotal\fR variable. The default update interval is 60 | 334 | of \fBbansTotal\fR variable. The default update interval is 60 |
338 | seconds. It can be configured either in the \fBsnmpd.conf\fR file | 335 | seconds. 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). |
340 | the \fBbanTableTimeout\fR variable. | ||
341 | .SS Branch \(dqagent\(dq | 337 | .SS Branch \(dqagent\(dq |
342 | .TP | 338 | The \fBagent\fR branch is reserved for OIDs for |
343 | .B banTableTimeout | 339 | implementation-specific management. It is not used currently. |
344 | Update interval for the \fBbanTable\fR cache. If set, it takes effect | ||
345 | immediately. | ||
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), |
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 | |||
@@ -101,10 +101,6 @@ $vars{'varnish_translate'} = sub { | |||
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 | ||
@@ -188,10 +184,6 @@ int varnish_mib_timeout_parser(const char *token, char *line, | |||
188 | void varnish_ban_table_timeout_parser(const char *token, char *line); | 184 | void varnish_ban_table_timeout_parser(const char *token, char *line); |
189 | void varnish_vcli_timeout_parser(const char *token, char *line); | 185 | void varnish_vcli_timeout_parser(const char *token, char *line); |
190 | 186 | ||
191 | int varnish_ban_table_timeout_set(netsnmp_agent_request_info *reqinfo, | ||
192 | netsnmp_request_info *requests, | ||
193 | struct VSM_data *vd); | ||
194 | |||
195 | void varnish_backend_table_timeout_parser(const char *token, char *line); | 187 | void varnish_backend_table_timeout_parser(const char *token, char *line); |
196 | 188 | ||
197 | @open ${name}@ | 189 | @open ${name}@ |