| | 1 | = Influxdb = |
| | 2 | |
| | 3 | Export data to csv |
| | 4 | {{{ |
| | 5 | OMD[monitor@3aa1bf04cbdd]:~$ influx -database nagflux -execute 'SELECT * FROM metrics' -format csv > test.csv |
| | 6 | }}} |
| | 7 | |
| | 8 | Select the lastest 2 value from metrics |
| | 9 | {{{ |
| | 10 | OMD[monitor@1f46579684ec]:~/etc$ influx |
| | 11 | Connected to http://127.0.0.1:8086 version 1.8.10 |
| | 12 | InfluxDB shell version: 1.8.10 |
| | 13 | > use nagflux |
| | 14 | Using database nagflux |
| | 15 | > SELECT * FROM metrics ORDER BY DESC LIMIT 2 |
| | 16 | name: metrics |
| | 17 | time command crit crit-fill host max min performanceLabel service unit value warn warn-fill |
| | 18 | ---- ------- ---- --------- ---- --- --- ---------------- ------- ---- ----- ---- --------- |
| | 19 | 2022-05-05T10:18:27Z check-host-alive localhost rtmin ping ms 0.014 |
| | 20 | 2022-05-05T10:18:27Z check-host-alive 5000 none localhost 0 rta ping ms 0.028 3000 none |
| | 21 | > |
| | 22 | |
| | 23 | }}} |