Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
1e55150
Set up dependencies and README
WilliamMaa Jun 26, 2020
a3bea18
Build react app
Jun 26, 2020
ef482f0
Update readme and scripts
WilliamMaa Jun 27, 2020
2c97b54
Fix issue
WilliamMaa Jun 27, 2020
037f268
Add grafana build files
Jun 27, 2020
6cf5f14
Clear grafana log
WilliamMaa Jun 28, 2020
5de7e79
Test using yaml file
WilliamMaa Jun 28, 2020
d9ee3f5
Test docker file for grafana
WilliamMaa Jun 29, 2020
1731bef
Test grafana docker image
WilliamMaa Jun 30, 2020
2bb4baf
Test grafana dockerfile
WilliamMaa Jun 30, 2020
0e17073
Test grafana dockerfile
WilliamMaa Jun 30, 2020
511accb
Test dockerfile
WilliamMaa Jun 30, 2020
5e48c2f
Test grafana setup
WilliamMaa Jun 30, 2020
5ae330b
Test grafana setup
WilliamMaa Jun 30, 2020
6d11086
Fix runtime issue
Jul 1, 2020
adb606a
Fix runtime issue
WilliamMaa Jul 1, 2020
5189e9b
Merge branch 'grafana-setup' of https://github.com/WilliamMaa/openNet…
WilliamMaa Jul 1, 2020
e25daff
Fix runtime issue
WilliamMaa Jul 1, 2020
ae80687
Fix issues
WilliamMaa Jul 1, 2020
ad50994
Fix issues
WilliamMaa Jul 1, 2020
1f2409c
Fix issues
WilliamMaa Jul 1, 2020
9b09163
Fix issues
WilliamMaa Jul 1, 2020
0ea1416
Fix issues
WilliamMaa Jul 6, 2020
f5cf594
Fix issues
WilliamMaa Jul 6, 2020
bd0204d
Fix issue
WilliamMaa Jul 6, 2020
b8f2433
Add stop web interface.sh
WilliamMaa Jul 6, 2020
2e98197
Update stop_web_interface.sh
WilliamMaa Jul 6, 2020
512b5ef
Update stop_web_interface.sh
WilliamMaa Jul 6, 2020
367fb96
Fix issue
Jul 6, 2020
0c89673
Merge branch 'grafana-setup' of https://github.com/WilliamMaa/openNet…
Jul 6, 2020
5eef6ae
Fix issue
Jul 6, 2020
bcc18a0
Add build web file
Jul 9, 2020
89a6709
Fix start web scripts
Jul 9, 2020
95d74a6
Fix issues
WilliamMaa Jul 9, 2020
93d77ec
Add hostip
WilliamMaa Jul 9, 2020
0b77eb7
Fix issue
WilliamMaa Jul 9, 2020
89ea126
Fix issue
WilliamMaa Jul 9, 2020
482cd69
Test
WilliamMaa Jul 9, 2020
4099e63
Test parsing host ip
WilliamMaa Jul 9, 2020
4fb5925
Add remove function
WilliamMaa Jul 10, 2020
af4a224
Fix issue
WilliamMaa Jul 10, 2020
7da37e5
Test
WilliamMaa Jul 10, 2020
03e3319
Fix issue
WilliamMaa Jul 10, 2020
5a1d366
Fix issue
WilliamMaa Jul 10, 2020
f3ea409
Fix issue
WilliamMaa Jul 10, 2020
930338d
Test
WilliamMaa Jul 10, 2020
873c06f
Fix issue
WilliamMaa Jul 10, 2020
43b3c1b
Fix issue
WilliamMaa Jul 10, 2020
4c8d49b
Fix start scripts issue
Jul 12, 2020
249cce5
Update stop_web_interface.sh
WilliamMaa Jul 14, 2020
af66bea
Update start_web_console.sh
WilliamMaa Jul 15, 2020
aba056e
Update cors_server.py
WilliamMaa Jul 15, 2020
df43df4
Update go.sh
WilliamMaa Jul 15, 2020
47422e0
Create LaunchNFChain.react.js
WilliamMaa Jul 15, 2020
cab6f92
Update App.react.js
WilliamMaa Jul 15, 2020
0d2b27b
Update AppWrapper.react.js
WilliamMaa Jul 15, 2020
4c96e9c
Add python scripts
WilliamMaa Jul 15, 2020
a0c128b
Fix issue
WilliamMaa Jul 15, 2020
816e566
Fix issue
WilliamMaa Jul 15, 2020
52cb6d6
Web build
Jul 15, 2020
1fe37a5
Merge branch 'grafana_nf_demo' of https://github.com/WilliamMaa/openN…
Jul 15, 2020
f8b7b4f
Update go.sh
WilliamMaa Jul 15, 2020
0caa6be
Update go.sh
WilliamMaa Jul 15, 2020
08871ec
Update go.sh
WilliamMaa Jul 15, 2020
1325188
Update go.sh
WilliamMaa Jul 15, 2020
eee3c32
Update go.sh
WilliamMaa Jul 15, 2020
31e6564
Add influxdb
WilliamMaa Jul 15, 2020
ff43023
Add push gateway
WilliamMaa Jul 15, 2020
f9921d5
Fix issue
WilliamMaa Jul 15, 2020
b536eb5
Create pushgateway_monitor.py
WilliamMaa Jul 20, 2020
a5fa72e
Add scripts for pushgateway
WilliamMaa Jul 20, 2020
2b2991a
Update start_web_console.sh
WilliamMaa Jul 20, 2020
67041e2
Update pushgateway_monitor.py
WilliamMaa Jul 20, 2020
6ffa206
Update pushgateway_monitor.py
WilliamMaa Jul 20, 2020
f40ea6e
Update pushgateway_monitor.py
WilliamMaa Jul 20, 2020
9e217c5
Update pushgateway_monitor.py
WilliamMaa Jul 20, 2020
2588e69
Update pushgateway_monitor.py
WilliamMaa Jul 20, 2020
b9b1f56
Update pushgateway_monitor.py
WilliamMaa Jul 20, 2020
f119043
Update start_web_console.sh
WilliamMaa Jul 20, 2020
4f3bb64
Update pushgateway_monitor.py
WilliamMaa Jul 20, 2020
2b7169f
Test
WilliamMaa Jul 22, 2020
2d3825e
Update config.py
WilliamMaa Jul 22, 2020
58a3638
Update config.py
WilliamMaa Jul 22, 2020
4536d52
Update config.py
WilliamMaa Jul 22, 2020
d19e73f
Test
WilliamMaa Jul 22, 2020
385b6ae
Update config.py
WilliamMaa Jul 22, 2020
248da50
Test
WilliamMaa Jul 22, 2020
a60efc5
Update config.py
WilliamMaa Jul 22, 2020
9c16da4
Update config.py
WilliamMaa Jul 22, 2020
d41e47e
Update config.py
WilliamMaa Jul 22, 2020
5ca6c63
Update config.py
WilliamMaa Jul 22, 2020
d51bec9
Update config.py
WilliamMaa Jul 22, 2020
9c2cfe0
Update config.py
WilliamMaa Jul 22, 2020
58605a5
Update config.py
WilliamMaa Jul 22, 2020
5b63fd6
Update config.py
WilliamMaa Jul 22, 2020
ef0a9da
Update config.py
WilliamMaa Jul 22, 2020
2ca7909
Update config.py
WilliamMaa Jul 22, 2020
52969ea
Update config.py
WilliamMaa Jul 22, 2020
852f825
Update config.py
WilliamMaa Jul 22, 2020
5b1043c
Update config.py
WilliamMaa Jul 22, 2020
8934ed5
Test with three nfs
WilliamMaa Jul 22, 2020
7f76f7c
Update config.py
WilliamMaa Jul 22, 2020
96448ec
Update config.py
WilliamMaa Jul 22, 2020
4412aaa
Update config.py
WilliamMaa Jul 22, 2020
90e2112
Update example_chain.json
WilliamMaa Jul 22, 2020
2e2a93e
Update config.py
WilliamMaa Jul 22, 2020
8680697
Update config.py
WilliamMaa Jul 22, 2020
24ce829
Update config.py
WilliamMaa Jul 22, 2020
533f028
Fix config.py for killing nfs
Jul 22, 2020
1ef4005
Revert "Fix config.py for killing nfs"
WilliamMaa Jul 22, 2020
e74fc28
Fixed issue
WilliamMaa Jul 22, 2020
23a4948
Update config.py
WilliamMaa Jul 22, 2020
5451743
Create flask_server.py
WilliamMaa Jul 23, 2020
5aab18d
Add flask server
WilliamMaa Jul 24, 2020
e474437
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
66ef41c
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
e1dae2e
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
c20cbcf
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
7f4c998
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
2179591
Fix flask server issue
WilliamMaa Jul 24, 2020
c128dd6
Update flask_server.py
WilliamMaa Jul 24, 2020
6278fb6
Update flask_server.py
WilliamMaa Jul 24, 2020
d025608
Update flask_server.py
WilliamMaa Jul 24, 2020
c3ab799
Update flask_server.py
WilliamMaa Jul 24, 2020
d2ac7e8
Update flask_server.py
WilliamMaa Jul 24, 2020
bf6bd47
Update flask_server.py
WilliamMaa Jul 24, 2020
17d9b48
Update flask_server.py
WilliamMaa Jul 24, 2020
d554519
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
7584677
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
674c445
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
ebc9c44
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
736e9d4
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
a5cf155
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
a5a6569
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
5af058c
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
bebe5d1
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
16c56ff
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
d668be7
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
7758d7c
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
8c0a4fe
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
fe58dc9
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
70b8352
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
15984c6
Update LaunchNFChain.react.js
WilliamMaa Jul 24, 2020
9fd9353
Update LaunchNFChain.react.js
WilliamMaa Jul 28, 2020
9372ba0
Update shell script to use flask server
WilliamMaa Jul 28, 2020
1bd88d3
Add dependencies
WilliamMaa Jul 28, 2020
d66b297
Fix shell scripts
WilliamMaa Jul 29, 2020
459c4a1
Update flask_server.py
WilliamMaa Jul 29, 2020
9c4345a
Update stop_web_interface.sh
WilliamMaa Jul 30, 2020
56eba0b
Update end point for flask
WilliamMaa Aug 2, 2020
70c30cc
Update flask_server.py
WilliamMaa Aug 2, 2020
ea3652e
Fixed issue new web build
Aug 2, 2020
8e4766f
Fix server issue
WilliamMaa Aug 5, 2020
a0eb3aa
Test tabler react
WilliamMaa Aug 5, 2020
602c49c
Update LaunchNFChain.react.js
WilliamMaa Aug 5, 2020
7c11b13
Test tabler react
WilliamMaa Aug 5, 2020
d96e695
Test tabler react
WilliamMaa Aug 5, 2020
a71b991
Test tabler react
WilliamMaa Aug 5, 2020
123d2e0
Test react
WilliamMaa Aug 6, 2020
503b8ec
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
83bb8eb
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
4e3ce42
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
2832481
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
e6e819f
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
94af0dc
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
87c7c10
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
136b5a2
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
3ad8150
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
c7c2334
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
530c5c8
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
bc95c4d
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
f2b87d9
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
8408387
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
b767efc
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
3796683
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
3c5a3b5
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
f2dcc94
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
54f7108
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
c7d3fe2
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
9c9ba1f
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
eed5508
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
2959171
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
1042d40
Fix issues
WilliamMaa Aug 6, 2020
622a10b
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
441ce68
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
83de4b8
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
ad929b4
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
63202d0
Update LaunchNFChain.react.js
WilliamMaa Aug 6, 2020
6eb8d22
Update front end
WilliamMaa Aug 10, 2020
eab0e41
Update LaunchNFChain.react.js
WilliamMaa Aug 10, 2020
312e913
Update LaunchNFChain.react.js
WilliamMaa Aug 10, 2020
775a090
Fix pushgateway
WilliamMaa Aug 11, 2020
b6461da
Update pushgateway
WilliamMaa Aug 13, 2020
b313a0a
Update grafana_use_guide.md
WilliamMaa Aug 13, 2020
89fe733
Documentation update
WilliamMaa Aug 13, 2020
bf90c92
Documanetation update
WilliamMaa Aug 13, 2020
8fc84d4
Update stop_web_interface.sh
WilliamMaa Aug 13, 2020
00b934f
Update start_web_console.sh
WilliamMaa Aug 13, 2020
a87ff1a
Create nf_stats.json
WilliamMaa Aug 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# dpdk built target
dpdk-1.8.0/x86_64-native-linuxapp-gcc/*

# nf chain log files
**/nf-chain-logs/**

# ctags files
tags
.tags
Expand Down
215 changes: 215 additions & 0 deletions examples/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
#!/usr/bin/env python3

# openNetVM
# https://sdnfv.github.io
#
# OpenNetVM is distributed under the following BSD LICENSE:
#
# Copyright(c)
# 2015-2018 George Washington University
# 2015-2018 University of California Riverside
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * The name of the author may not be used to endorse or promote
# products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

"""This script allows a user to launch a chain of NFs from a JSON
config file passed in as an argument when running the script"""

import sys
import json
import os
import shlex
import time
from signal import signal, SIGINT, SIGKILL
from subprocess import Popen
from datetime import datetime

def handler(signal_received, frame):
"""Handles cleanup on user shutdown"""
# pylint: disable=unused-argument
for lf in log_files:
lf.close()
print("\nExiting...")
sys.exit(0)

def get_config():
"""Gets path to JSON config file"""
if len(sys.argv) < 2:
print("Error: Specify config file")
sys.exit(0)

file_name = sys.argv[1]
if os.path.exists(file_name):
return file_name
print("Error: No config file found")
sys.exit(0)

def on_failure():
"""Handles shutdown on error"""
for lf in log_files:
lf.close()
try:
script_pid = os.getpid()
pid_list = os.popen("ps -ef | awk '{if ($3 == " + str(script_pid) + ") print $2 " " $3}'")
pid_list = pid_list.read().split("\n")[:-2]
print(pid_list)
for i in pid_list:
i = i.replace(str(script_pid), "")
temp = os.popen("ps -ef | awk '{if($3 == " + i + ") print $2 " " $3}'")
temp = temp.read().replace(str(i), "").replace("\n", "")
if temp != "":
_pid_for_nf = os.popen("ps -ef | awk '{if($3 == " + temp + ") print $2 " " $3}'")
_pid_for_nf = _pid_for_nf.read().replace(temp, "").replace("\n", "")
os.system("sudo kill " + _pid_for_nf)
except:
pass
print("Error occurred. Exiting...")
sys.exit(1)

def on_timeout():
"""Handles shutdown on error"""
for lf in log_files:
lf.close()
try:
script_pid = os.getpid()
pid_list = os.popen("ps -ef | awk '{if ($3 == " + str(script_pid) + ") print $2 " " $3}'")
pid_list = pid_list.read().split("\n")[:-2]
for i in pid_list:
i = i.replace(str(script_pid), "")
temp = os.popen("ps -ef | awk '{if($3 == " + i + ") print $2 " " $3}'")
temp = temp.read().replace(str(i), "").replace("\n", "")
if temp != "":
_pid_for_nf = os.popen("ps -ef | awk '{if($3 == " + temp + ") print $2 " " $3}'")
_pid_for_nf = _pid_for_nf.read().replace(temp, "").replace("\n", "")
os.system("sudo kill " + _pid_for_nf)
except:
pass
print("Exiting...")
sys.exit(0)

def running_services():
"""Checks running NFs"""
if timeout != 0:
start = time.time()
time.clock()
elapsed = 0
while elapsed < timeout:
elapsed = time.time() - start
for pl in procs_list:
ret_code = pl.poll()
if ret_code is not None:
on_failure()
break
time.sleep(.1)
on_timeout()
else:
while 1:
for pl in procs_list:
ret_code = pl.poll()
if ret_code is not None:
on_failure()
break
time.sleep(.1)

procs_list = []
nf_list = []
cmds_list = []
log_files = []
timeout = 0
if __name__ == '__main__':
signal(SIGINT, handler)
if os.path.basename(os.getcwd()) != "examples":
print("Error: Run script from within /examples folder")
sys.exit(1)

config_file = get_config()

with open(config_file) as f:
try:
data = json.load(f)
except:
print("Cannot load config file. Check JSON syntax")
sys.exit(1)

is_dir = 0
for k, v in data.items():
if k == "objects":
for item in v:
if "directory" in item:
if is_dir == 0:
log_dir = item["directory"]
if os.path.isdir(log_dir) is False:
try:
os.mkdir(log_dir)
print("Creating directory %s" % (log_dir))
is_dir = 1
except OSError:
print("Creation of directory %s failed" % (log_dir))
on_failure()
else:
print("Outputting log files to %s" % (log_dir))
is_dir = 1
if "TTL" in item:
timeout = item["TTL"]
else:
for item in v:
nf_list.append(k)
cmds_list.append("./go.sh " + item['parameters'])

if is_dir == 0:
time_obj = datetime.now().time()
log_dir = time_obj.strftime("%H:%M:%S")
os.mkdir(log_dir)
print("Creating directory %s" % (log_dir))
is_dir = 1

for cmd, nf in zip(cmds_list, nf_list):
service_name = nf
instance_id = cmd.split()
log_file = "log-" + nf + "-" + instance_id[1] + ".txt"
log_files.append(open(os.path.join(log_dir, log_file), 'w'))

i = 0
cwd = os.getcwd()
for cmd, nf in zip(cmds_list, nf_list):
try:
os.chdir(nf)
except OSError:
print("Error: Unable to access NF directory %s." \
" Check syntax in your configuration file" % (nf))
sys.exit(1)
try:
p = Popen(shlex.split(cmd), stdout=(log_files[i]), stderr=log_files[i], \
universal_newlines=True)
procs_list.append(p)
print("Starting %s %s" % (nf, cmd), flush=True)
i += 1
except OSError:
pass
os.chdir(cwd)

running_services()
15 changes: 15 additions & 0 deletions examples/example_chain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"simple_forward": [
{
"parameters": "2 -d 1"
}
],
"speed_tester": [
{
"parameters": "1 -d 2 -c 16000"
},
{
"parameters": "3 -d 3 -c 16000"
}
]
}
7 changes: 3 additions & 4 deletions onvm/go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ then
cd ../onvm_web/ || usage
if [ -n "${web_port}" ]
then
. start_web_console.sh -p "${web_port}"
sudo ./start_web_console.sh -p "${web_port}"
else
. start_web_console.sh
sudo ./start_web_console.sh
fi

cd "$ONVM_HOME"/onvm || usage
Expand All @@ -124,6 +124,5 @@ sudo "$SCRIPTPATH"/onvm_mgr/"$RTE_TARGET"/onvm_mgr -l "$cpu" -n 4 --proc-type=pr
if [ "${stats}" = "-s web" ]
then
echo "Killing web stats running with PIDs: $ONVM_WEB_PID, $ONVM_WEB_PID2"
kill "$ONVM_WEB_PID"
kill "$ONVM_WEB_PID2"
sudo "$ONVM_HOME"/onvm_web/stop_web_interface.sh
fi
38 changes: 38 additions & 0 deletions onvm_web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# openNetVM
# https://sdnfv.github.io
#
# OpenNetVM is distributed under the following BSD LICENSE:
#
# Copyright(c)
# 2015-2018 George Washington University
# 2015-2018 University of California Riverside
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * The name of the author may not be used to endorse or promote
# products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

FROM grafana/grafana
COPY ./provisioning /etc/grafana/provisioning
35 changes: 35 additions & 0 deletions onvm_web/Prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets: []
scheme: http
timeout: 10s
api_version: v1

# define new exporters under this
scrape_configs:
- job_name: prometheus
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- localhost:9090

# listen on node exporter
- job_name: node
static_configs:
- targets:
# keep this as HOSTIP, the bash script will automatically replace it with the correct ip address
- HOSTIP:9100

- job_name: push_gateway
static_configs:
- targets:
- HOSTIP:9091
Loading