Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support EVO output #262

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8f9c7e0
Update EVO
May 8, 2021
52bfbcc
EVO dashboard
May 8, 2021
5cc14b5
Update README.md
Oct 19, 2021
b6c192c
Create README
Oct 19, 2021
761a910
Add files via upload
zhanghaofeng Oct 19, 2021
8910801
Update README
zhanghaofeng Oct 19, 2021
65d76c0
Grafana Output
zhanghaofeng Oct 19, 2021
7391d45
Create sample_output
zhanghaofeng Oct 19, 2021
e8a1a23
misc
Dec 22, 2021
955da56
Merge branch 'master' of https://github.com/zhanghaofeng/open-nti
Dec 22, 2021
9de4332
fix for evo
Dec 23, 2021
3735f33
evo fix
Dec 23, 2021
8064828
evo fix
Dec 23, 2021
5047f6f
dashboards
zhanghaofeng Jan 15, 2022
abb2040
dasboard
zhanghaofeng Jan 15, 2022
719aa56
Update top.parser.yaml
zhanghaofeng Jan 16, 2022
c50870d
Update open-nti.params
zhanghaofeng Jan 16, 2022
336e1bc
Update docker-compose.yml
zhanghaofeng Jan 16, 2022
b9042fa
Update docker-compose-persistent.yml
zhanghaofeng Jan 16, 2022
f065e6b
Update docker-compose-persistent-main.yml
zhanghaofeng Jan 16, 2022
96a0840
fix
zhanghaofeng Jan 16, 2022
73d3af2
Delete token
zhanghaofeng Jan 16, 2022
0b553c7
evo fpc support
zhanghaofeng Jan 17, 2022
0afd2c6
commit fix
zhanghaofeng Jan 17, 2022
91285e0
dashboard fix
zhanghaofeng Jan 17, 2022
815257d
fix
zhanghaofeng Jan 17, 2022
587bb3a
Update docker-compose-persistent.yml
zhanghaofeng Jan 18, 2022
ccf2ac9
Update docker-compose-persistent-main.yml
zhanghaofeng Jan 18, 2022
bc586fd
Update docker-compose.yml
zhanghaofeng Jan 18, 2022
51807d9
Create evo.json
zhanghaofeng Jan 18, 2022
b44dabc
Update Makefile
zhanghaofeng Feb 19, 2022
6219146
Update startcron.py
zhanghaofeng Feb 19, 2022
87ffbd3
Update Makefile
zhanghaofeng Feb 19, 2022
5ba5064
Update Makefile
zhanghaofeng Feb 19, 2022
352d17c
Update startcron.py
zhanghaofeng Feb 19, 2022
ea90356
Update Dockerfile
zhanghaofeng Feb 19, 2022
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
148 changes: 4 additions & 144 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,150 +1,10 @@
FROM phusion/baseimage:0.9.22
MAINTAINER Damien Garros <dgarros@gmail.com>
FROM zhanghaofeng3672/open-nti-evo:latest
MAINTAINER Haofeng Zhang <hfzhang.cn@gmail.com>

RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get clean &&\
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# dependencies
RUN apt-get -y update && \
apt-get -y install \
git adduser libfontconfig wget make curl && \
apt-get clean &&\
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN rm -f /etc/service/sshd/down
RUN /usr/sbin/enable_insecure_key

# Latest version
ENV GRAFANA_VERSION 5.1.3
ENV INFLUXDB_VERSION 1.5.1
ENV TELEGRAF_VERSION 1.5.3-1

RUN apt-get -y update && \
apt-get -y install \
build-essential \
python-simplejson \
python-dev \
python-yaml \
python-pip \
python-dev \
libxml2-dev \
libxslt-dev \
tcpdump \
tree \
nginx-light \
snmp \
zlib1g-dev \
libffi-dev \
libssl-dev && \
apt-get clean &&\
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*


RUN pip install --upgrade setuptools

# # Install some python modules
RUN pip install influxdb && \
pip install xmltodict && \
pip install pexpect && \
easy_install pysnmp && \
pip install lxml && \
pip install python-crontab && \
pip install pytest && \
pip install mock && \
pip install cryptography==2.1.2 && \
pip install junos-eznc==2.1.7 && \
pip install enum

RUN mkdir /src

########################
### Install Grafana
########################
RUN mkdir /src/grafana &&\
mkdir /opt/grafana &&\
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-${GRAFANA_VERSION}.linux-x64.tar.gz -O /src/grafana.tar.gz &&\
tar -xzf /src/grafana.tar.gz -C /opt/grafana --strip-components=1 &&\
rm /src/grafana.tar.gz

RUN /opt/grafana/bin/grafana-cli plugins install grafana-piechart-panel

########################
### Install InfluxDB ###
########################

RUN curl -s -o /tmp/influxdb_latest_amd64.deb https://dl.influxdata.com/influxdb/releases/influxdb_${INFLUXDB_VERSION}_amd64.deb && \
dpkg -i /tmp/influxdb_latest_amd64.deb && \
rm /tmp/influxdb_latest_amd64.deb

ADD docker/influxdb/types.db /usr/share/collectd/types.db
ADD docker/influxdb/influxdb-config.toml /config/config.toml
ADD docker/influxdb/influxdbrun.sh /influxdbrun.sh

RUN mkdir /etc/service/influxdb
ADD docker/influxdb/influxdb.launcher.sh /etc/service/influxdb/run

########################
### Install telegraf ###
########################

RUN curl -s -o /tmp/telegraf_latest_amd64.deb https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}_amd64.deb && \
dpkg -i /tmp/telegraf_latest_amd64.deb && \
rm /tmp/telegraf_latest_amd64.deb

ADD docker/telegraf/telegraf.conf /etc/telegraf/telegraf.conf

RUN mkdir /etc/service/telegraf
ADD docker/telegraf/telegraf.launcher.sh /etc/service/telegraf/run

########################
### Configuration ###
########################

### Configure Grafana ###
ADD docker/grafana/custom.ini /opt/grafana/conf/custom.ini
ADD docker/grafana/run.sh /etc/service/grafana/run
#ADD docker/grafana/grafana.init.sh /etc/my_init.d/grafana.init.sh

## Add the default dashboards
#RUN mkdir /src/dashboards && \
RUN mkdir /opt/grafana/data && \
chown -R www-data /opt/grafana/data

### Configure nginx ###
ADD docker/nginx/nginx.conf /etc/nginx/nginx.conf
ADD docker/nginx/run.sh /etc/service/nginx/run
### Remove Grafana login
COPY docker/grafana/custom.ini /opt/grafana/conf/

### open-nti python scripts (for gathering informatino from server to router) ###
ADD open-nti/open-nti.py /opt/open-nti/open-nti.py
ADD open-nti/startcron.py /opt/open-nti/startcron.py
ADD tests/main/pyez_mock.py /opt/open-nti/pyez_mock.py

### Add test files
RUN mkdir /opt/open-nti/tests

# ################

RUN chmod +x /etc/service/nginx/run &&\
chmod +x /etc/service/grafana/run &&\
#chmod +x /etc/my_init.d/grafana.init.sh &&\
chmod +x /etc/service/influxdb/run &&\
chmod +x /etc/service/telegraf/run &&\
chmod +x /influxdbrun.sh

WORKDIR /
ENV HOME /root
ENV SSL_SUPPORT **False**
ENV SSL_CERT **None**
RUN chmod -R 777 /var/log/

# ## Graphana
EXPOSE 80
EXPOSE 3000

# # Influxdb Admin server WebUI
EXPOSE 8083
EXPOSE 8086

CMD ["/sbin/my_init"]
151 changes: 151 additions & 0 deletions Dockerfile_backup
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
FROM phusion/baseimage:0.9.22
MAINTAINER Damien Garros <[email protected]>

# RUN apt-get -y update && \
# apt-get -y upgrade && \
# apt-get clean &&\
# rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# dependencies
#RUN apt-get -y update && \
# apt-get -y install \
RUN git adduser libfontconfig wget make curl && \
apt-get clean &&\
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN rm -f /etc/service/sshd/down
RUN /usr/sbin/enable_insecure_key

# Latest version
ENV GRAFANA_VERSION 7.5.5
ENV INFLUXDB_VERSION 2.0.6
ENV TELEGRAF_VERSION 1.18.2

#RUN apt-get -y update && \
RUN apt-get -y install \
build-essential \
python-simplejson \
python-dev \
python-yaml \
python-pip \
python-dev \
libxml2-dev \
libxslt-dev \
tcpdump \
tree \
nginx-light \
snmp \
zlib1g-dev \
libffi-dev \
libssl-dev && \
apt-get clean &&\
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*


RUN pip install --upgrade setuptools

# # Install some python modules
RUN pip install influxdb && \
pip install xmltodict && \
pip install pexpect && \
easy_install pysnmp && \
pip install lxml && \
pip install python-crontab && \
pip install pytest && \
pip install mock && \
pip install cryptography==2.1.2 && \
pip install junos-eznc==2.1.7 && \
pip install enum

RUN mkdir /src

########################
### Install Grafana
########################
RUN mkdir /src/grafana &&\
mkdir /opt/grafana &&\
wget https://dl.grafana.com/oss/release/grafana-${GRAFANA_VERSION}.linux-amd64.tar.gz -O /src/grafana.tar.gz &&\
#wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-${GRAFANA_VERSION}.linux-x64.tar.gz -O /src/grafana.tar.gz &&\
tar -xzf /src/grafana.tar.gz -C /opt/grafana --strip-components=1 &&\
rm /src/grafana.tar.gz

RUN /opt/grafana/bin/grafana-cli plugins install grafana-piechart-panel

########################
### Install InfluxDB ###
########################

RUN curl -s -o /tmp/influxdb_latest_amd64.deb https://dl.influxdata.com/influxdb/releases/influxdb2_${INFLUXDB_VERSION}_amd64.deb && \
dpkg -i /tmp/influxdb_latest_amd64.deb && \
rm /tmp/influxdb_latest_amd64.deb

ADD docker/influxdb/types.db /usr/share/collectd/types.db
ADD docker/influxdb/influxdb-config.toml /config/config.toml
ADD docker/influxdb/influxdbrun.sh /influxdbrun.sh

RUN mkdir /etc/service/influxdb
ADD docker/influxdb/influxdb.launcher.sh /etc/service/influxdb/run

########################
### Install telegraf ###
########################

RUN curl -s -o /tmp/telegraf_latest_amd64.deb https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}_amd64.deb && \
dpkg -i /tmp/telegraf_latest_amd64.deb && \
rm /tmp/telegraf_latest_amd64.deb

ADD docker/telegraf/telegraf.conf /etc/telegraf/telegraf.conf

RUN mkdir /etc/service/telegraf
ADD docker/telegraf/telegraf.launcher.sh /etc/service/telegraf/run

########################
### Configuration ###
########################

### Configure Grafana ###
ADD docker/grafana/custom.ini /opt/grafana/conf/custom.ini
ADD docker/grafana/run.sh /etc/service/grafana/run
#ADD docker/grafana/grafana.init.sh /etc/my_init.d/grafana.init.sh

## Add the default dashboards
#RUN mkdir /src/dashboards && \
RUN mkdir /opt/grafana/data && \
chown -R www-data /opt/grafana/data

### Configure nginx ###
ADD docker/nginx/nginx.conf /etc/nginx/nginx.conf
ADD docker/nginx/run.sh /etc/service/nginx/run

### open-nti python scripts (for gathering informatino from server to router) ###
ADD open-nti/open-nti.py /opt/open-nti/open-nti.py
ADD open-nti/startcron.py /opt/open-nti/startcron.py
ADD tests/main/pyez_mock.py /opt/open-nti/pyez_mock.py

### Add test files
RUN mkdir /opt/open-nti/tests

# ################

RUN chmod +x /etc/service/nginx/run &&\
chmod +x /etc/service/grafana/run &&\
#chmod +x /etc/my_init.d/grafana.init.sh &&\
chmod +x /etc/service/influxdb/run &&\
chmod +x /etc/service/telegraf/run &&\
chmod +x /influxdbrun.sh

WORKDIR /
ENV HOME /root
ENV SSL_SUPPORT **False**
ENV SSL_CERT **None**
RUN chmod -R 777 /var/log/

# ## Graphana
EXPOSE 80
EXPOSE 3000

# # Influxdb Admin server WebUI
EXPOSE 8083
EXPOSE 8086

CMD ["/sbin/my_init"]
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ PWD = $(shell pwd)
VAR_FILE ?= open-nti.params
DOCKER_FILE = docker-compose.yml
DOCKER_FILE_P = docker-compose-persistent.yml
DOCKER_FILE_MAIN = docker-compose-persistent-main.yml
TIME ?= 1m
TAG ?= all
NBR ?= 1
Expand Down Expand Up @@ -70,9 +71,6 @@ test-build:
docker build -f $(INPUT_SNMP_DIR)/Dockerfile -t $(INPUT_SNMP_IMAGE_NAME):$(TEST_TAG) $(INPUT_SNMP_DIR)
docker build -f $(INPUT_INTERNAL_DIR)/Dockerfile -t $(INPUT_INTERNAL_IMAGE_NAME):$(TEST_TAG) $(INPUT_INTERNAL_DIR)

test-run:
python -m pytest -v -x

cli:
docker exec -i -t $(MAIN_CONTAINER_NAME) /bin/bash

Expand All @@ -84,6 +82,9 @@ start-persistent:
@echo "Use docker compose file: $(DOCKER_FILE_P)"
$(RUN_OPTIONS) docker-compose -f $(DOCKER_FILE_P) up -d

start-main:
$(RUN_OPTIONS) docker-compose -f $(DOCKER_FILE_MAIN) up -d

stop:
@echo "Use docker compose file: $(DOCKER_FILE)"
$(RUN_OPTIONS) docker-compose -f $(DOCKER_FILE) down
Expand Down
50 changes: 7 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,16 @@
![Beta](https://img.shields.io/badge/status-beta-yellowgreen.svg?style=flat "Beta")
![Community](https://img.shields.io/badge/support-community-blue.svg?style=flat "Community")

# OpenNTI

OpenNTI is a container packaged with all tools needed to collect and visualize time series data from network devices.
Data can be collected from different sources:

- **Data Collection Agent** : Collect data on devices using CLI/Shell or Netconf
- **Data Streaming Collector** : Take all data streamed by Juniper devices as Input (JTI, Analyticsd, soon Openconfig with gRPC)
- **Statsd interface** : Accept any Statsd packets

It's pre-configured with all tools and with a default dashboard ..
**Send it data, it will graph it**

Thanks to docker, it can run pretty much anywhere on server, on laptop ... on the device itself

All the credit goes to: https://github.com/Juniper/open-nti
More detailed description of a project can be found [here](http://forums.juniper.net/t5/Analytics/Open-Source-Universal-Telemetry-Collector-for-Junos/ba-p/288677) (including a series of videos on how to use it):

# Requirements

The requirement is to have **docker** and **docker-compose** installed on your Linux server/machine.
Please check the [Install Guide](http://open-nti.readthedocs.io/en/latest/install.html)

# Documentation

The complete [documentation is available here](http://open-nti.readthedocs.io/en/latest/)
## Enhancement
- Add EVO OS support for Juniper routers
- in ./data/commands.yaml, add the support:
top -b -n 1 | shell re #run top command at RE node, support EVO only
top -bn 1 | shell fpc0 #run top command at FPC node. fpc slot has to be specified, support EVO only
- Add dashboard to monitor router healthy status, per chassis level and per process level

# Ask a question or Report an Issue ?

Please open an [issue on Github](https://github.com/Juniper/open-nti/issues) this is the fastest way to get an answer.

# Want to contribute ?

Contributions are more than welcome, small or big. We love to receive contributions for **Parsers** or **Dashboards** that you might have created.
If you are planning a big change, please start a discussion first to make sure we'll be able to merge it.

# Contributors

### Current

- [Efrain Gonzalez](https://github.com/3fr61n)
- [Pablo Sagrera Garcia](https://github.com/psagrera)
- [Michael Pergament](https://github.com/mpergament)
- [Ishaan Kumar](https://github.com/eeishaan)

### Former
- [Damien Garros](https://github.com/dgarros)
- [Ajay Kumar Chintala](https://github.com/ajhai)

## Tools used
- fluentd
Expand Down
Binary file added dashboards/Grafana-CS-TB1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading