-
Notifications
You must be signed in to change notification settings - Fork 23
Home
GPON Monitor is an ASP.NET Core web application intended for quick diagnostic of Dasan Networks GPON OLTs and related ONTs.
GPON Monitor requires:
- .NET Core >=2.2.0 compatible server (https://www.microsoft.com/net/core),
- Dasan Networks OLT running software version 6.xx or higher with configured SNMP service (RW access),
- routable connection between server and monitored OLT.
Currently supported ONUs:
- Dasan Networks: H645B, H665, H665G, H640G, H640GW-02, H660GW, H660GM, H680GW.
Install the latest version of .NET Core (https://www.microsoft.com/net/core#linuxdebian):
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/debian/9/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update
sudo apt-get install aspnetcore-runtime-2.2
sudo apt-get install supervisor nginx
Download, unpack the latest version od GPONMonitor form https://github.com/bartekkois/GPONMonitor/releases and restore dependencies
sudo mkdir -p /var/www_aspnetcore/GPONMonitor
cd /var/www_aspnetcore
curl -sSL -o GPONMonitor-1.0.5.zip https://github.com/bartekkois/GPONMonitor/releases/download/1.0.5/GPONMonitor-1.0.5.zip
sudo unzip GPONMonitor-1.0.5.zip -d /var/www_aspnetcore/GPONMonitor
Configure monitored OLTs in GPONMonitor/devicesconfiguration.json (name and SNMP related variables as shown below).
{
"DevicesConfiguration": {
"Devices": [
{
"Name": "GPON OLT A",
"IpAddress": "10.1.1.21",
"SnmpPort": "161",
"SnmpVersion": "2",
"SnmpCommunity": "public",
"SnmpTimeout": 3000
},
{
"Name": "GPON OLT B",
"IpAddress": "10.1.1.11",
"SnmpPort": "161",
"SnmpVersion": "2",
"SnmpCommunity": "public",
"SnmpTimeout": 3000
},
{
"Name": "GPON OLT C",
"IpAddress": "10.2.1.11",
"SnmpPort": "161",
"SnmpVersion": "2",
"SnmpCommunity": "public",
"SnmpTimeout": 3000
}
]
}
}
Change the default configuration in /etc/supervisor/conf.d/GPONMonitor.conf to:
[program:GPONMonitor]
command=/usr/local/bin/dotnet /var/www_aspnetcore/GPONMonitor/GPONMonitor.dll
directory=/var/www_aspnetcore/GPONMonitor
autostart=true
autorestart=true
stderr_logfile=/var/log/GPONMonitor.err.log
stdout_logfile=/var/log/GPONMonitor.out.log
environment=ASPNETCORE_ENVIRONMENT=Production
user=www-data
stopsignal=INT
Restart supervisor:
service supervisor restart
Change the default configuration in /etc/nginx/sites-available/default to:
server {
listen 5001 default_server;
listen [::]:5001 default_server;
root /var/www_aspnetcore/GPONMonitor;
server_name _;
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Restart nginx:
service nginx restart
Access GPON Monitor through your web browser at http://your_server_ip:5001
To upgrade application simply stop the supervisor, change GPONMonitor binaries while preserving devicesconfiguration.json and start supervisor.
For security reasons we highly encourage NOT to expose this application to the public internet and to use it ONLY in your intranet or through the VPN.
- Changes in the devicesconfiguration.json requires application to be restarted via supervisor.
- Any underscore sign '_' in ONUs descriptions is automatically changed to space in order to deal with spaces in the OLT CLI.
- ONUs can by filtered by the ONU Port ID and ONU ID using an underscore operator (e.g.
3._
- shows all ONUs on Port 3,
3.1_
- shows all ONUs on Port 3 with ID beginning with 1,
3._user
- shows all ONUs on Port 3 containing "user" in their name).