LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   MTR [Ubuntu 18.04] vs MTR-Tiny[Ubuntu 16.04] CSV output (https://www.linuxquestions.org/questions/linux-networking-3/mtr-%5Bubuntu-18-04%5D-vs-mtr-tiny%5Bubuntu-16-04%5D-csv-output-4175682987/)

licsuc_vs 10-01-2020 02:09 AM

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.86;1601535913;OK;8.8.8.8;1;ubuntu181-Virtual-Machine;53
MTR.0.86;1601535913;OK;8.8.8.8;2;IP2;254
MTR.0.86;1601535913;OK;8.8.8.8;3;???;0


MTR 0.92 on Ubuntu 18.04
Code:

Mtr_Version,Start_Time,Status,Host,Hop,Ip,Loss%,Snt, ,Last,Avg,Best,Wrst,StDev,
MTR.0.92,1601536032,OK,8.8.8.8,1,ubuntu181-Virtual-Machine,30.00,10,3,0.13,0.08,0.05,0.13,0.04
MTR.0.92,1601536032,OK,8.8.8.8,2,IP2,0.00,10,0,0.62,0.51,0.30,0.87,0.19
MTR.0.92,1601536032,OK,8.8.8.8,3,???,100.00,10,10,0.00,0.00,0.00,0.00,0.00
MTR.0.92,1601536032,OK,8.8.8.8,4,dns.google,100.00,10,10,0.00,0.00,0.00,0.00,0.00


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

boughtonp 10-02-2020 10:49 AM

Quote:

Originally Posted by licsuc_vs (Post 6171391)
My question here is if anyone knows that last column output of MTR-Tiny represents? since no headers area displayed.

Does it not tell you what the columns are if you do "mtr --help" or "man mtr" ?


licsuc_vs 10-05-2020 01:40 AM

Quote:

Originally Posted by boughtonp (Post 6171960)
Does it not tell you what the columns are if you do "mtr --help" or "man mtr" ?



No they do not show what the columns for CSV output are.

boughtonp 10-05-2020 07:11 AM

Quote:

Originally Posted by licsuc_vs (Post 6172688)
No they do not show what the columns for CSV output are.

According to its debian packages page, mtr-tiny is simply mtr compiled without support for X.

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.


licsuc_vs 10-05-2020 09:08 AM

Quote:

Originally Posted by boughtonp (Post 6172753)

I still don't think the new columns names are particularly great, but at least they're there.

Took a look at the fix issue you found, however it seems that's not for mtr-tiny.
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.

boughtonp 10-05-2020 12:12 PM


 
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.


licsuc_vs 10-19-2020 01:58 AM

Quote:

Originally Posted by boughtonp (Post 6172833)
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.



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

computersavvy 10-25-2020 03:13 PM

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

licsuc_vs 10-28-2020 10:26 AM

Quote:

Originally Posted by computersavvy (Post 6178724)
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

Yes on MTR 0.92 that's available however not on MTR 0.84


All times are GMT -5. The time now is 06:44 AM.