aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@nxc.no>2018-02-05 20:56:59 +0100
committerSergey Poznyakoff <gray@nxc.no>2018-02-05 20:56:59 +0100
commitf7677f32b90eea37e54b39a3e26e5437924a2ada (patch)
tree4112eecd0acecd664e613fd1b66dd177b7ab87ba /src
parent027e83b6f5dc6a63ed9c69e534c0b994041df14f (diff)
downloadvarnish-mib-f7677f32b90eea37e54b39a3e26e5437924a2ada.tar.gz
varnish-mib-f7677f32b90eea37e54b39a3e26e5437924a2ada.tar.bz2
Version 2.0
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/VARNISH-MIB.txt6
-rw-r--r--src/auth.c2
-rw-r--r--src/backend.h3
-rw-r--r--src/ban.c2
-rw-r--r--src/belex.l17
-rw-r--r--src/modconf.c17
-rw-r--r--src/varnish-mib.885
-rw-r--r--src/vcli.c2
9 files changed, 99 insertions, 37 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 55cdb85..5c79dfc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,8 @@
1# This file is part of varnish-mib -*- automake -*- 1# This file is part of varnish-mib -*- automake -*-
2# Copyright (C) 2014-2015 Sergey Poznyakoff 2# Copyright (C) 2014-2018 Sergey Poznyakoff
3# 3#
4# varnish-mib is free software; you can redistribute it and/or modify 4# varnish-mib is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option) 6# the Free Software Foundation; either version 3, or (at your option)
7# any later version. 7# any later version.
8# 8#
diff --git a/src/VARNISH-MIB.txt b/src/VARNISH-MIB.txt
index 6b03f21..b7e77f1 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 "201802020845Z" 23 LAST-UPDATED "201802052024Z"
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 "201802020845Z" 30 REVISION "201802052024Z"
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 }
@@ -851,13 +851,13 @@ objectsLRUMoved OBJECT-TYPE
851 851
852objectsPurges OBJECT-TYPE 852objectsPurges OBJECT-TYPE
853 SYNTAX Counter64 853 SYNTAX Counter64
854 MAX-ACCESS read-only 854 MAX-ACCESS read-only
855 STATUS current 855 STATUS current
856 DESCRIPTION 856 DESCRIPTION
857 "Number of purge operations executed" 857 "Number of purge operations executed."
858 ::= { objects 8 } 858 ::= { objects 8 }
859 859
860objectsObjPurged OBJECT-TYPE 860objectsObjPurged OBJECT-TYPE
861 SYNTAX Counter64 861 SYNTAX Counter64
862 MAX-ACCESS read-only 862 MAX-ACCESS read-only
863 STATUS current 863 STATUS current
diff --git a/src/auth.c b/src/auth.c
index e9abbe4..2ff6aba 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -1,8 +1,8 @@
1/* This file is part of varnish-mib -*- c -*- 1/* This file is part of varnish-mib -*- c -*-
2 Copyright (C) 2014-2015 Sergey Poznyakoff 2 Copyright (C) 2014-2018 Sergey Poznyakoff
3 3
4 Varnish-mib is free software; you can redistribute it and/or modify 4 Varnish-mib is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option) 6 the Free Software Foundation; either version 3, or (at your option)
7 any later version. 7 any later version.
8 8
diff --git a/src/backend.h b/src/backend.h
index d60f613..b13e644 100644
--- a/src/backend.h
+++ b/src/backend.h
@@ -2,14 +2,13 @@ typedef struct be_string {
2 char const *start; 2 char const *start;
3 size_t len; 3 size_t len;
4} be_string_t; 4} be_string_t;
5 5
6typedef void (*regfun_t)(be_string_t *, be_string_t *, be_string_t *, void *); 6typedef void (*regfun_t)(be_string_t *, be_string_t *, be_string_t *, void *);
7 7
8void read_defs(const char *str, size_t len, regfun_t regfun, void *d); 8struct vsm;
9void varnish_backend_table_timeout_parser(const char *token, char *line);
10struct VSC_point; 9struct VSC_point;
11void backend_register(char const *name, size_t len, char const *param, 10void backend_register(char const *name, size_t len, char const *param,
12 const struct VSC_point *vpt); 11 const struct VSC_point *vpt);
13void backend_clear(void); 12void backend_clear(void);
14int backend_collect_addr(struct vsm *vsm); 13int backend_collect_addr(struct vsm *vsm);
15void backend_parser(const char *str, size_t len, regfun_t regfun, void *d); 14void backend_parser(const char *str, size_t len, regfun_t regfun, void *d);
diff --git a/src/ban.c b/src/ban.c
index 1f4583b..a50b5a3 100644
--- a/src/ban.c
+++ b/src/ban.c
@@ -1,8 +1,8 @@
1/* This file is part of varnish-mib -*- c -*- 1/* This file is part of varnish-mib -*- c -*-
2 Copyright (C) 2014-2015 Sergey Poznyakoff 2 Copyright (C) 2014-2018 Sergey Poznyakoff
3 3
4 Varnish-mib is free software; you can redistribute it and/or modify 4 Varnish-mib is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option) 6 the Free Software Foundation; either version 3, or (at your option)
7 any later version. 7 any later version.
8 8
diff --git a/src/belex.l b/src/belex.l
index f35f114..bc0bfc0 100644
--- a/src/belex.l
+++ b/src/belex.l
@@ -1,6 +1,23 @@
1/* This file is part of varnish-mib
2 Copyright (C) 2018 Sergey Poznyakoff
3
4 Varnish-mib is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option)
7 any later version.
8
9 Varnish-mib is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with varnish-mib. If not, see <http://www.gnu.org/licenses/>.
16*/
17
1%option nounput 18%option nounput
2%option noinput 19%option noinput
3 20
4%{ 21%{
5#include "backend.h" 22#include "backend.h"
6 23
diff --git a/src/modconf.c b/src/modconf.c
index 85b2582..64177c1 100644
--- a/src/modconf.c
+++ b/src/modconf.c
@@ -1,6 +1,23 @@
1/* This file is part of varnish-mib
2 Copyright (C) 2018 Sergey Poznyakoff
3
4 Varnish-mib is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option)
7 any later version.
8
9 Varnish-mib is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with varnish-mib. If not, see <http://www.gnu.org/licenses/>.
16*/
17
1#include "varnish_mib.h" 18#include "varnish_mib.h"
2#include <ctype.h> 19#include <ctype.h>
3 20
4static int 21static int
5timeout_parser(const char *token, char *line, unsigned *retval) 22timeout_parser(const char *token, char *line, unsigned *retval)
6{ 23{
diff --git a/src/varnish-mib.8 b/src/varnish-mib.8
index 8d86f18..77912af 100644
--- a/src/varnish-mib.8
+++ b/src/varnish-mib.8
@@ -1,8 +1,8 @@
1.\" This file is part of Varnish-mib -*- nroff -*- 1.\" This file is part of Varnish-mib -*- nroff -*-
2.\" Copyright (C) 2014-2016 Sergey Poznyakoff 2.\" Copyright (C) 2014-2018 Sergey Poznyakoff
3.\" 3.\"
4.\" Varnish-mib is free software; you can redistribute it and/or modify 4.\" Varnish-mib is free software; you can redistribute it and/or modify
5.\" it under the terms of the GNU General Public License as published by 5.\" it under the terms of the GNU General Public License as published by
6.\" the Free Software Foundation; either version 3, or (at your option) 6.\" the Free Software Foundation; either version 3, or (at your option)
7.\" any later version. 7.\" any later version.
8.\" 8.\"
@@ -10,43 +10,69 @@
10.\" but WITHOUT ANY WARRANTY; without even the implied warranty of 10.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12.\" GNU General Public License for more details. 12.\" GNU General Public License for more details.
13.\" 13.\"
14.\" You should have received a copy of the GNU General Public License 14.\" You should have received a copy of the GNU General Public License
15.\" along with Varnish-mib. If not, see <http://www.gnu.org/licenses/>. 15.\" along with Varnish-mib. If not, see <http://www.gnu.org/licenses/>.
16.TH VARNISH-MIB 8 "February 2, 2018" "varnish-mib" 16.TH VARNISH-MIB 8 "February 5, 2018" "varnish-mib"
17.SH NAME 17.SH NAME
18varnish\-mib \- net-snmp module for obtaining Varnish Cache statistics 18varnish\-mib \- Net-SNMP module for Varnish Cache monitoring
19.SH SYNOPSIS 19.SH SYNOPSIS
20In \fBsnmpd.conf\fR(5): 20In \fBsnmpd.conf\fR(5):
21.PP 21.PP
22.B dlmod varnish_mib /usr/lib/snmp/varnish\-mib.so 22.B dlmod varnish_mib /usr/lib/snmp/varnish\-mib.so
23.SH DESCRIPTION 23.SH DESCRIPTION
24Dynamically loadable object module for 24Dynamically loadable object module for