Giter Site home page Giter Site logo

I don't want use docker about mtr-monitor HOT 8 OPEN

carbolymer avatar carbolymer commented on June 1, 2024
I don't want use docker

from mtr-monitor.

Comments (8)

carbolymer avatar carbolymer commented on June 1, 2024

check available options here:
https://github.com/carbolymer/mtr-monitor/blob/master/mtr-monitor.sh#L10

You don't need to create schema in influxdb. Everything is done in https://github.com/carbolymer/mtr-monitor/blob/master/save_data.py

You just need to set correct port and host in mtr-monitor.sh

from mtr-monitor.

pangqiss1986 avatar pangqiss1986 commented on June 1, 2024

this is my mtr-monitor.sh
#!/bin/bash

number of pings sent

CYCLES=30

inverval between MTR tests in seconds

INTERVAL=30
MTR_HOSTS=("114.114.114.114")

if you need to change it, change also in influx-cli.sh

INFLUXDB_HOST="localhost"
INFLUXDB_PORT=8086

END OF CONFIG

function monitor_mtr() {
for MTR_HOST in "${MTR_HOSTS[@]}"; do
( mtr --report --json --report-cycles $CYCLES $MTR_HOST | ./save_data.py --host $INFLUXDB_HOST --port $INFLUXDB_PORT ) &
done
}

which mtr &>/dev/null
if [ $? -eq 1 ]; then
echo "mtr is not available on this system - it is required for this script to work"
exit 1
fi

while true; do
monitor_mtr
sleep $INTERVAL
done

THE save_data.py must use python3?

from mtr-monitor.

carbolymer avatar carbolymer commented on June 1, 2024

looks fine, and yes you should use python 3

from mtr-monitor.

pangqiss1986 avatar pangqiss1986 commented on June 1, 2024

THANK YOU!

from mtr-monitor.

pangqiss1986 avatar pangqiss1986 commented on June 1, 2024

sorry,I have two question....
NO.1:
(py3) [root@localhost mtr]# ./mtr-monitor.sh
mtr: unrecognized option '--json'
mtr: unrecognized option '--json'
mtr: unrecognized option '--json'
mtr: unrecognized option '--json'
Traceback (most recent call last):
File "./save_data.py", line 65, in
main()
File "./save_data.py", line 38, in main
mtr_result = json.load(sys.stdin)
File "/usr/local/lib/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/local/lib/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

NO.2
grafana version is 6.1.4 THE grafana_dashboard_mtr.json import is
Templating init failed
Datasource named ${DS_TBD_INFLUX MTR} was not found

can you help me...thank!!!

from mtr-monitor.

carbolymer avatar carbolymer commented on June 1, 2024
  1. which mtr version you have? you need >=0.87

  2. You need to setup datasource manually in grafana

from mtr-monitor.

pangqiss1986 avatar pangqiss1986 commented on June 1, 2024

the grafana_dashboard_mtr.json import is not support grafana6.1.4.....

from mtr-monitor.

teesa-git avatar teesa-git commented on June 1, 2024

@pangqiss1986 @carbolymer The same quessiton No.1

from mtr-monitor.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.