MTR [Ubuntu 18.04] vs MTR-Tiny[Ubuntu 16.04] CSV output
So my goal here is to monitor connection to some IPs using MTR command and using telegraf, will display graphs/tables to grafana.
Telegraf requires the MTR output to be in CSV format. I noticed that there is a difference in output between MTR on Ubuntu 18.04 and MTR-Tiny on Ubuntu 16.04. Examples below: MTR-TINY 0.84 on Ubuntu 16.04 Code:
root@mtr:~# mtr -C 8.8.8.8 MTR 0.92 on Ubuntu 18.04 Code:
Mtr_Version,Start_Time,Status,Host,Hop,Ip,Loss%,Snt, ,Last,Avg,Best,Wrst,StDev, My question here is if anyone knows that last column output of MTR-Tiny represents? since no headers area displayed. Or I would appreciate if anyone has suggestions how this can be achieved away from telegraf CSV output to grafana. Thanks |
Quote:
|
Quote:
No they do not show what the columns for CSV output are. |
Quote:
Thus the issue tracker, where you need to report the documentation flaw as a bug, is here: https://github.com/traviscross/mtr/issues update: Except I just noticed, your examples are from different versions and - since the newer one has headers - this means it has already been resolved. A quick search of the repo reveals this commit which appears to show that the final column was "last". I still don't think the new columns names are particularly great, but at least they're there. |
Quote:
MTR-tiny output is still witout column names. I ran an MTR command from separate nodes [ same subnet ] towards 8.8.8.8, one with MTR v.092 and one with MTR v.086 and the LAST values aren't similar. |
Hrm, I just installed it to have a look, and on Debian Buster with mtr-tiny 0.92-2 running either "mtr -C 8.8.8.8" or "mtr --csv ddg.gg" just sits there outputting nothing until I Ctrl-C.
Same deal for json/xml options - no output. The --raw option does output stuff, and not specifying anything appears to default to the --curses interface. *shrug* Dunno what's up with that, but if the data you're getting doesn't resemble LAST and still doesn't have headers then I revert to suggesting you raise a bug. |
Quote:
I managed to find a way to upgrade MTR version on Ubuntu 16.04 from 0.84 to 0.92. With v0.92, all the required columns are listed. From another post online: 1) apt install autoconf pkgconf automake make 2) git clone https://github.com/traviscross/mtr.git 3) cd mtr/ 4) ./bootstrap.sh && ./configure && make 5) cp mtr* /usr/bin/ 6) mtr --v to confirm |
According to the man page for mtr you can use the -o option to tell it which fields to display and in what order so you only see the data you wish. I am using 0.92
|
Quote:
|
All times are GMT -5. The time now is 06:44 AM. |