-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Zhenbo edited this page Aug 15, 2022
·
24 revisions
Welcome to the sense-rtmon wiki!
- The
*.yml
files in the root directory handles configuration for both cloud and site stacks.ifName
andvlan
together under Hosts and switchData are the unique identifier of each flow. - The
scrapeInterval
andscrapeDuration
do not change the rate. Every scrape is by default 15s and currently no configuration can change that. This is only applicable toSite
stack since no pulling and pushing allowed in the system. -
communityString
underswitchData
is unique to each network element and should be kept as a secret not shown on Github.
-
Site
installs SNMP exporter from Github. SNMP has many dependencies when generatingsnmp.yml
file. Make sure GO is up to date and gcc is installed properly. - Install also makes script files that curl the local port metrics to pushgateway server on the
Cloud
stack. For example, Node exporter runs on 9100. Script generated from install script will look like thiscurl -s ${MYIP}:9100/metrics | curl --data-binary @- $pushgateway_server/metrics/job/node-exporter/instance/$MYIP
. Instance indicates where the data coming from. This URL can be customized. - ARP and SNMP are similar but more complicated with intermediate storage files.
- The new scripts are added to the current crontab with a cycle of 15s. Every 15s the result of the curl is pushed to pushgateway.
-
./start.sh
script parses the configuration file and fills in./start2.sh
and run it. - It gives the user to choose which container to start and It composes all the containers in the end.
- It dynamically generates a push script file for each exporter inside
crontabs
sub directory based on user inputs.
- SNMP access the switch and MIB though this line:
<host_ip_address>:9116/snmp?target=<switch_ip_address>&module=<module_names_e.g.: if_mib>
- Curl stores the result of the query in an intermediate file then curl the content to pushgateway.
- Downloading MIBS refer to: https://github.com/esnet/sense-rtmon/issues/17#issue-1330372320
- ARP is more complicated for it needs to be able to detect changes in ARP table (
arp -a
). - ARP files are located under
Metrics/ARPMetrics
. - Important files:
- arpOut.json stores the output of
arp -a
of the host system in json format. The plain output is converted to json by convertARP.py. - prev.json stores the previous
arp -a
output. - delete.json stores all current URLs on pushgateway in the format that can be processed to erase pushgateway data directly.
- arpOut.json stores the output of
- Put together. aroOut.json is updated every 15s. If there is discrepancy between the it and prev.json, ARP container deletes all current URLs from delete.json files and push new URLs from arpOut.json.
- ping_status and prev_ping_status work in a similar fashion. The host pings the other host and stores the result and send it to pushgateway. If the two files are different, delete everything on pushgateway and resend the URLs and ping status.
- Installs Grafana and Nginx. It allows user to encrypt Grafana to HTTPS using Nginx Reverse Proxy.
- Script Exporter is pull from Github.
- Pushgateway, Script Exporter, and Prometheus, Nginx and Grafana are all under cloud stack right now. To start just run ./start.sh under cloud directory.
- Grafana ports 3000:3000 needed see https://github.com/esnet/sense-rtmon/issues/18#issue-1332438911
For more questions please contact: Zhenbo [email protected] and Pratyush [email protected]
RealTime Flow Monitoring and Analysis