forked from alexandermarston/vnstat-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php
49 lines (40 loc) · 1.42 KB
/
config.php
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
<?php
/*
* Copyright (C) 2016 Alexander Marston ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
error_reporting(E_ALL | E_NOTICE);
// date format: hourly
// ga = 12-hour am/pm (ex. 11am)
// H = 24-hour (ex. 23)
$vnstat_config_format_hour = "ga";
// Path of vnstat
$vnstat_bin_dir = '/usr/local/bin/vnstat';
// Set to true to set your own interfaces
$use_predefined_interfaces = false;
// Byte format to use in graphs
$byte_formatter = "MB";
if ($use_predefined_interfaces == true) {
$interface_list = array("eth0", "eth1");
$interface_name['eth0'] = "Internal #1";
$interface_name['eth1'] = "Internal #2";
} else {
$interface_list = get_vnstat_interfaces($vnstat_bin_dir);
foreach ($interface_list as $interface)
{
$interface_name[$interface] = $interface;
}
}
?>