-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot.cibhrc.sample
122 lines (101 loc) · 4.05 KB
/
dot.cibhrc.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# this file keeps all of the default options for cibh's
# utilities. currently it is sourced in, but some might want
# to just make it read like a regular library.
$network=$ENV{NETWORK};
$network="fakenetwork" if not $network;
$home=$ENV{HOME};
$home="." if not $home;
$communities={
'ittc'=>"public",
'fakenetwork' => 'public',
'sl'=> "notok2see",
'dial'=>"dontlook",
'icm'=>"lothberg"
};
$default_options={
user=>'pwhiting',
script_path=>"$home/scripts/",
base_path=>"$home/data/$network",
data_path=>"$home/data/$network/snmp",
map_path=>"$home/data/$network/maps",
config_path=>"$home/data/$network/configs",
log_path=>"$home/data/$network/logs",
network=>$network,
chart_cgi=>"chart?net=$network", # see comment below
graph_size=>'900,500', # used by d3chart
accept=>"To",
reject=>"(^Loopback)|(^Null)|layer|subif|(^Async)|Old",
noshutdown=>1,
spikekiller=> 10**11,
destination=>sub {my($d)=(@_);my($r)=($d=~/To ([^\s,]+)/);lc($r);},
default_line_color=>'#9C9CA0',
community=>$communities->{$network},
contact=>'[email protected]',
datastore=> {
name => 'InfluxDB',
options => {
host => '127.0.0.1',
port => 8086,
username => 'scott',
password => 'tiger',
database => 'test',
},
}
};
1
__END__
data_path
The directory for all of the data.
map_path
The directory where you want usage2fig to dump the xfigs
which have been updated according to the current utilization.
The xfigs have .used appended to their filenames prior to
storage.
graph_size
A comma separated width,height value pair for graphs. This is only used by
d3chart.
chart_cgi
The url to use for generating charts. It needs to be given in
the context of the client (ie - the path you would type into your
browser's window.) With my system I modify the apache config to
have a script aliase to the cibh cgi directory:
ScriptAlias /live/ /home/pwhiting/cibh/cgi-bin/
and then I set chart_cgi to be "/live/chart". This allows
me to use "www.petesnet.com/live/chart" as the url.
accept
A regular expression applied to the concatination of the interface
name and the description. Only interfaces matching this are
inserted into the mib table. If this is not defined then the
option is quietly ignored.
reject
A regular expression applied to the concatination of the interface
name the the description. If an interface matches this expression
it is not added to the mib table. If this is not defined then the
option is quietly ignored.
noshutdown
Flag to reject all interfaces which are shut down (status!=1);
destination
Subroutine reference which is capable of taking the description
stored by build-config and returning a destination router.
The description field is the interface name followed by a single
space followed by the configured description. You can use
an anonymous composer or you can put in a hard ref to a subroutine.
spikekiller
If defined, this is the maximum value expected on any circuit in bps.
This is used to detect router reloads and not log a giant spike in
traffic if an unexpected counter wrap happens.
default_line_color
When processing a fig file, if a line URL doesn't match to the regex
from the snmp router description it is usually left whatever color
it was originally created with in the fig file. This allows you to
set it to another color. The idea is to distinguish between links
that are down and links that don't have a match. For example, a link with
ifOperStatus down might be set to black where a link with no matching regex
might be grey.
community
This is the community string to use. Normally this would be
$communities->{$network}, which allows you to define a different community
for different networks you have.
This used to allow a hash and support different communities per router, with
a default as 'default'. This was changed because the SNMP poller now uses
an event loop that doesn't allow for different communities.