bundles/vnstat: add flag to generate statistics images, add to home.router
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
2d856a1e9a
commit
7d78ac9db8
6 changed files with 73 additions and 9 deletions
14
bundles/vnstat/files/generate-vnstati
Normal file
14
bundles/vnstat/files/generate-vnstati
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
TARGET=$1
|
||||
|
||||
if [[ -z "$TARGET" ]]
|
||||
then
|
||||
echo "Usage: $0 <TARGET_DIR>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
vnstati --output "$TARGET/daily.png" --days
|
||||
vnstati --output "$TARGET/monthly.png" --months
|
||||
vnstati --output "$TARGET/yearly.png" --years
|
||||
vnstati --output "$TARGET/top10.png" --top10
|
14
bundles/vnstat/files/index.html
Normal file
14
bundles/vnstat/files/index.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>${node.name} - ${interface}</title>
|
||||
</head>
|
||||
<body style="background-color: #333333; color: #FFFFFF; text-align: center;">
|
||||
<h1>${node.name} - ${interface}</h1>
|
||||
<p><img src="/top10.png" alt="TOP 10 Days"></p>
|
||||
<p><img src="/daily.png" alt="Daily Statistics"></p>
|
||||
<p><img src="/monthly.png" alt="monthly Statistics"></p>
|
||||
<p><img src="/yearly.png" alt=""></p>
|
||||
<p>All times in UTC</p>
|
||||
</body>
|
||||
</html>
|
|
@ -46,16 +46,15 @@ HourlyRate 1
|
|||
SummaryRate 1
|
||||
SummaryLayout 1
|
||||
TransparentBg 0
|
||||
CBackground "FFFFFF"
|
||||
CEdge "AEAEAE"
|
||||
CHeader "606060"
|
||||
CHeaderTitle "FFFFFF"
|
||||
CHeaderDate "FFFFFF"
|
||||
CText "000000"
|
||||
CBackground "333333"
|
||||
CEdge "444444"
|
||||
CHeader "444444"
|
||||
CHeaderTitle "EDEDED"
|
||||
CHeaderDate "EDEDED"
|
||||
CText "EDEDED"
|
||||
CLine "B0B0B0"
|
||||
CLineL "-"
|
||||
CRx "92CF00"
|
||||
CTx "606060"
|
||||
CRx "009FC5"
|
||||
CTx "85BD00"
|
||||
CRxD "-"
|
||||
CTxD "-"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue