Ubuntu 24.04
Sponsored Link

InfluxDB : Telegraf インストール2024/06/10

 
各種メトリクス収集/送信エージェント Telegraf をインストールします。
Telegraf では多くの Input /Output プラグインに対応しており、様々なデータを 収集/送信 可能です。
⇒ https://docs.influxdata.com/telegraf/v1.27/plugins/
[1] Telegraf をインストールします。
root@dlp:~#
curl -fsSL https://repos.influxdata.com/influxdata-archive_compat.key -o /etc/apt/keyrings/influxdata-archive_compat.key

root@dlp:~#
echo "deb [signed-by=/etc/apt/keyrings/influxdata-archive_compat.key] https://repos.influxdata.com/ubuntu stable main" | tee /etc/apt/sources.list.d/influxdata.list

root@dlp:~#
apt update

root@dlp:~#
apt -y install telegraf
[2] Telegraf の設定です。
例として、システムの CPU 関連データを取得して、InfluxDB に出力するよう設定します。
root@dlp:~#
mv /etc/telegraf/telegraf.conf /etc/telegraf/telegraf.conf.org

root@dlp:~#
vi /etc/telegraf/telegraf.conf
# 新規作成

[global_tags]
  # メトリクスにタグを付加する場合は任意の値を設定
  dc = "hiroshima-01"

[agent]
  # データを収集する間隔
  interval = "10s"
  # [true] の場合 収集時間は :00, :10, :20 ...
  round_interval = true
  # バッチ処理で Outoput に送信する際のメトリクスサイズ
  metric_batch_size = 1000
  # 使用するメモリーの上限値
  metric_buffer_limit = 10000
  # メトリクス収集の遅延時間 - 各プラグインがメトリクス収集の際に設定値の範囲内でスリープ
  collection_jitter = "0s"
  # Output データを出力する間隔
  flush_interval = "10s"
  # データを出力する際の遅延時間
  # flush_interval=10s, flush_jitter=5s の場合 10-15s 毎にデータフラッシュ
  flush_jitter = "0s"

[[outputs.influxdb]]
  # InfluxDB アクセス URL
  urls = ["https://dlp.srv.world:8086"]
  database = "telegraf"
  # 認証を有効にしている場合は管理者ユーザー名とパスワードを指定
  username = "admin"
  password = "adminpassword"
  # HTTPS を有効にしている場合は証明書へのパス
  # InfluxDB と同じ証明書でよいが [telegraf] ユーザーが要読み取り可
  tls_cert = "/etc/telegraf/server.crt"
  tls_key = "/etc/telegraf/server.key"
  # 自己署名の証明書の場合は [true]
  insecure_skip_verify = true

# CPU 関連メトリクスの読み取り設定 (下例はデフォルト)
[[inputs.cpu]]
  percpu = true
  totalcpu = true
  collect_cpu_time = false
  report_active = false

root@dlp:~#
systemctl restart telegraf
# リテンションポリシーを変更する
# 下例は 30 日 (デフォルトは無期限)

root@dlp:~#
influx -username admin -password adminpassword -database telegraf -ssl -unsafeSsl \
-execute 'create retention policy "one_month" on "telegraf" duration 30d replication 1 default'
root@dlp:~#
influx -username admin -password adminpassword -database telegraf -ssl -unsafeSsl \
-execute 'show retention policies'

name      duration shardGroupDuration replicaN default
----      -------- ------------------ -------- -------
autogen   0s       168h0m0s           1        false
one_month 720h0m0s 24h0m0s            1        true

# データ確認

root@dlp:~#
influx -username admin -password adminpassword -database telegraf -precision rfc3339 \
-execute 'select * from cpu' -ssl -unsafeSsl

name: cpu
time                 cpu       dc           host          usage_guest usage_guest_nice usage_idle        usage_iowait        usage_irq usage_nice usage_softirq        usage_steal usage_system         usage_user
----                 ---       --           ----          ----------- ---------------- ----------        ------------        --------- ---------- -------------        ----------- ------------         ----------
2024-06-10T01:02:00Z cpu-total hiroshima-01 dlp.srv.world 0           0                99.79979979979997 0.15015015015015024 0         0          0                    0           0.050050050050050074 0
2024-06-10T01:02:00Z cpu0      hiroshima-01 dlp.srv.world 0           0                99.89989989990227 0                   0         0          0                    0           0.10010010010010015  0
2024-06-10T01:02:00Z cpu1      hiroshima-01 dlp.srv.world 0           0                99.49999999999821 0.29999999999998883 0         0          0                    0           0.09999999999999332  0.09999999999999332
2024-06-10T01:02:10Z cpu-total hiroshima-01 dlp.srv.world 0           0                99.69984992496049 0.1500750375187599  0         0          0.050025012506251444 0           0.05002501250625033  0.05002501250625033
2024-06-10T01:02:10Z cpu0      hiroshima-01 dlp.srv.world 0           0                100               0                   0         0          0                    0           0                    0
2024-06-10T01:02:10Z cpu1      hiroshima-01 dlp.srv.world 0           0                99.69939879759772 0.3006012024048208  0         0          0                    0           0                    0
.....
.....
[3] その他、メモリー等のシステム関連のメトリクスを InfluxDB に出力する設定です。
root@dlp:~#
vi /etc/telegraf/telegraf.conf
# 最終行に追記

# メモリー
[[inputs.mem]]

# スワップ
[[inputs.swap]]

# ディスク
[[inputs.disk]]
  ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]

# ディスク IO
[[inputs.diskio]]

# カーネルの統計情報 (/proc/stat)
[[inputs.kernel]]

# プロセス
[[inputs.processes]]

# システム (Uptime 等)
[[inputs.system]]

# ネットワーク
[[inputs.net]]

root@dlp:~#
systemctl restart telegraf
root@dlp:~#
influx -username admin -password adminpassword -database telegraf -precision rfc3339 -execute 'show measurements' -ssl -unsafeSsl

name: measurements
name
----
cpu
disk
diskio
kernel
mem
net
processes
swap
system

root@dlp:~#
influx -username admin -password adminpassword -database telegraf -precision rfc3339 \
-execute 'select * from disk' -ssl -unsafeSsl

name: disk
time                 dc           device free        fstype host          inodes_free inodes_total inodes_used inodes_used_percent label                 mode path  total       used       used_percent
----                 --           ------ ----        ------ ----          ----------- ------------ ----------- ------------------- -----                 ---- ----  -----       ----       ------------
2024-06-10T01:04:00Z hiroshima-01 dm-0   20427476992 ext4   dlp.srv.world 1703230     1835008      131778      7.181331089564733   ubuntu--vg-ubuntu--lv rw   /     29408399360 7461117952 26.753294552779888
2024-06-10T01:04:00Z hiroshima-01 vda2   1725935616  ext4   dlp.srv.world 130751      131072       321         0.244903564453125                         rw   /boot 2040373248  190287872  9.930359020836718
2024-06-10T01:04:10Z hiroshima-01 dm-0   20427472896 ext4   dlp.srv.world 1703230     1835008      131778      7.181331089564733   ubuntu--vg-ubuntu--lv rw   /     29408399360 7461122048 26.75330923978728
2024-06-10T01:04:10Z hiroshima-01 vda2   1725935616  ext4   dlp.srv.world 130751      131072       321         0.244903564453125                         rw   /boot 2040373248  190287872  9.930359020836718
2024-06-10T01:04:20Z hiroshima-01 dm-0   20427460608 ext4   dlp.srv.world 1703230     1835008      131778      7.181331089564733   ubuntu--vg-ubuntu--lv rw   /     29408399360 7461134336 26.753353300809447
2024-06-10T01:04:20Z hiroshima-01 vda2   1725935616  ext4   dlp.srv.world 130751      131072       321         0.244903564453125                         rw   /boot 2040373248  190287872  9.930359020836718
2024-06-10T01:04:30Z hiroshima-01 dm-0   20427452416 ext4   dlp.srv.world 1703230     1835008      131778      7.181331089564733   ubuntu--vg-ubuntu--lv rw   /     29408399360 7461142528 26.753382674824223
2024-06-10T01:04:30Z hiroshima-01 vda2   1725935616  ext4   dlp.srv.world 130751      131072       321         0.244903564453125                         rw   /boot 2040373248  190287872  9.930359020836718
.....
.....

root@dlp:~#
influx -username admin -password adminpassword -database telegraf -precision rfc3339 \
-execute 'select * from diskio' -ssl -unsafeSsl

name: diskio
time                 dc           host          io_time iops_in_progress merged_reads merged_writes name  read_bytes read_time reads weighted_io_time write_bytes write_time writes
----                 --           ----          ------- ---------------- ------------ ------------- ----  ---------- --------- ----- ---------------- ----------- ---------- ------
2024-06-10T01:04:00Z hiroshima-01 dlp.srv.world 11965   1                0            0             dm-0  463815680  2672      13347 14548            859643904   11592      15371
2024-06-10T01:04:00Z hiroshima-01 dlp.srv.world 11972   0                3286         7575          vda3  464741376  1834      10101 17414            859643904   15288      8341
2024-06-10T01:04:00Z hiroshima-01 dlp.srv.world 4       0                0            0             loop0 14336      0         11    0                0           0          0
2024-06-10T01:04:00Z hiroshima-01 dlp.srv.world 14      0                0            0             vda1  266240     3         65    3                0           0          0
2024-06-10T01:04:00Z hiroshima-01 dlp.srv.world 81      0                19           19            vda2  4641792    6         132   45               159744      35         24
2024-06-10T01:04:00Z hiroshima-01 dlp.srv.world 12029   0                3305         7594          vda   471959552  1852      10402 24617            859803648   15324      8365
2024-06-10T01:04:10Z hiroshima-01 dlp.srv.world 81      0                19           19            vda2  4641792    6         132   45               159744      35         24
2024-06-10T01:04:10Z hiroshima-01 dlp.srv.world 12094   0                3305         7622          vda   471959552  1852      10402 24750            860450816   15397      8462
2024-06-10T01:04:10Z hiroshima-01 dlp.srv.world 4       0                0            0             loop0 14336      0         11    0                0           0          0
.....
.....

root@dlp:~#
influx -username admin -password adminpassword -database telegraf -precision rfc3339 \
-execute 'select * from kernel' -ssl -unsafeSsl

name: kernel
time                 boot_time  context_switches dc           entropy_avail host          interrupts processes_forked
----                 ---------  ---------------- --           ------------- ----          ---------- ----------------
2024-06-10T01:04:00Z 1717978801 362326           hiroshima-01 256           dlp.srv.world 257178     2821
2024-06-10T01:04:10Z 1717978801 364332           hiroshima-01 256           dlp.srv.world 258230     2821
2024-06-10T01:04:20Z 1717978801 366437           hiroshima-01 256           dlp.srv.world 259365     2826
2024-06-10T01:04:30Z 1717978801 367946           hiroshima-01 256           dlp.srv.world 260149     2826
2024-06-10T01:04:40Z 1717978801 369649           hiroshima-01 256           dlp.srv.world 261030     2826
2024-06-10T01:04:50Z 1717978801 371748           hiroshima-01 256           dlp.srv.world 262252     2831
2024-06-10T01:05:00Z 1717978801 373113           hiroshima-01 256           dlp.srv.world 262982     2831
2024-06-10T01:05:10Z 1717978801 374557           hiroshima-01 256           dlp.srv.world 263728     2835
2024-06-10T01:05:20Z 1717978801 376046           hiroshima-01 256           dlp.srv.world 264443     2835
2024-06-10T01:05:30Z 1717978801 379822           hiroshima-01 256           dlp.srv.world 270207     2841
.....
.....

root@dlp:~#
influx -username admin -password adminpassword -database telegraf -precision rfc3339 \
-execute 'select * from mem' -ssl -unsafeSsl

name: mem
time                 active    available  available_percent buffered cached    commit_limit committed_as dc           dirty  free       high_free high_total host          huge_page_size huge_pages_free huge_pages_total inactive  low_free low_total mapped    page_tables shared  slab      sreclaimable sunreclaim swap_cached swap_free  swap_total total      used      used_percent       vmalloc_chunk vmalloc_total     vmalloc_used write_back write_back_tmp
----                 ------    ---------  ----------------- -------- ------    ------------ ------------ --           -----  ----       --------- ---------- ----          -------------- --------------- ---------------- --------  -------- --------- ------    ----------- ------  ----      ------------ ---------- ----------- ---------  ---------- -----      ----      ------------       ------------- -------------     ------------ ---------- --------------
2024-06-10T01:04:00Z 242720768 3629207552 88.404083579278   31182848 852434944 6157795328   427429888    hiroshima-01 495616 2993098752 0         0          dlp.srv.world 2097152        0               0                658399232 0        0         161374208 2646016     1093632 94904320  47259648     47644672   0           4105170944 4105170944 4105248768 228532224 5.56683009763953   0             14073748835531776 20955136     0          0
2024-06-10T01:04:10Z 244047872 3624923136 88.2997192339697  31223808 858279936 6157795328   431624192    hiroshima-01 229376 2985848832 0         0          dlp.srv.world 2097152        0               0                658448384 0        0         162516992 2650112     1093632 101154816 53088256     48066560   0           4105170944 4105170944 4105248768 229896192 5.600055075639206  0             14073748835531776 20955136     0          0
2024-06-10T01:04:20Z 245817344 3622637568 88.24404494651078 31248384 858308608 6157795328   431624192    hiroshima-01 212992 2983526400 0         0          dlp.srv.world 2097152        0               0                658477056 0        0         162582528 2654208     1093632 101171200 53104640     48066560   0           4105170944 4105170944 4105248768 232165376 5.655330264263293  0             14073748835531776 20987904     0          0
2024-06-10T01:04:30Z 248037376 3621896192 88.22598572423468 31264768 858316800 6157795328   435818496    hiroshima-01 229376 2982752256 0         0          dlp.srv.world 2097152        0               0                658509824 0        0         162586624 2658304     1093632 101171200 53104640     48066560   0           4105170944 4105170944 4105248768 232914944 5.67358903595681   0             14073748835531776 20987904     0          0
2024-06-10T01:04:40Z 249470976 3621158912 88.20802627666728 31281152 858329088 6157795328   435818496    hiroshima-01 53248  2981978112 0         0          dlp.srv.world 2097152        0               0                658546688 0        0         162586624 2662400     1093632 101171200 53104640     48066560   0           4105170944 4105170944 4105248768 233660416 5.691748032941618  0             14073748835531776 20987904     0          0
2024-06-10T01:04:50Z 251441152 3615961088 88.08141217131717 31309824 858341376 6157795328   440012800    hiroshima-01 131072 2976751616 0         0          dlp.srv.world 2097152        0               0                658575360 0        0         162582528 2666496     1093632 101171200 53104640     48066560   0           4105170944 4105170944 4105248768 238845952 5.818062814165614  0             14073748835531776 20987904     0          0
2024-06-10T01:05:00Z 253296640 3614441472 88.0443957543866  31330304 858349568 6157795328   440012800    hiroshima-01 184320 2975203328 0         0          dlp.srv.world 2097152        0               0                658604032 0        0         162582528 2670592     1093632 101171200 53104640     48066560   0           4105170944 4105170944 4105248768 240365568 5.855079231096185  0             14073748835531776 20987904     0          0
2024-06-10T01:05:10Z 254935040 3613208576 88.01436356706557 31371264 858361856 6157795328   444207104    hiroshima-01 294912 2973913088 0         0          dlp.srv.world 2097152        0               0                658661376 0        0         162586624 2674688     1093632 101171200 53104640     48066560   0           4105170944 4105170944 4105248768 241602560 5.8852111931259214 0             14073748835531776 20971520     0          0
.....
.....

root@dlp:~#
influx -username admin -password adminpassword -database telegraf -precision rfc3339 \
-execute 'select * from net' -ssl -unsafeSsl

name: net
time                 bytes_recv bytes_sent dc           drop_in drop_out err_in err_out host          icmp_inaddrmaskreps icmp_inaddrmasks icmp_incsumerrors icmp_indestunreachs icmp_inechoreps icmp_inechos icmp_inerrors icmp_inmsgs icmp_inparmprobs icmp_inredirects icmp_insrcquenchs icmp_intimeexcds icmp_intimestampreps icmp_intimestamps icmp_outaddrmaskreps icmp_outaddrmasks icmp_outdestunreachs icmp_outechoreps icmp_outechos icmp_outerrors icmp_outmsgs icmp_outparmprobs icmp_outratelimitglobal icmp_outratelimithost icmp_outredirects icmp_outsrcquenchs icmp_outtimeexcds icmp_outtimestampreps icmp_outtimestamps icmpmsg_intype3 icmpmsg_outtype3 interface ip_defaultttl ip_forwarding ip_forwdatagrams ip_fragcreates ip_fragfails ip_fragoks ip_inaddrerrors ip_indelivers ip_indiscards ip_inhdrerrors ip_inreceives ip_inunknownprotos ip_outdiscards ip_outnoroutes ip_outrequests ip_outtransmits ip_reasmfails ip_reasmoks ip_reasmreqds ip_reasmtimeout packets_recv packets_sent speed tcp_activeopens tcp_attemptfails tcp_currestab tcp_estabresets tcp_incsumerrors tcp_inerrs tcp_insegs tcp_maxconn tcp_outrsts tcp_outsegs tcp_passiveopens tcp_retranssegs tcp_rtoalgorithm tcp_rtomax tcp_rtomin udp_ignoredmulti udp_incsumerrors udp_indatagrams udp_inerrors udp_memerrors udp_noports udp_outdatagrams udp_rcvbuferrors udp_sndbuferrors udplite_ignoredmulti udplite_incsumerrors udplite_indatagrams udplite_inerrors udplite_memerrors udplite_noports udplite_outdatagrams udplite_rcvbuferrors udplite_sndbuferrors
----                 ---------- ---------- --           ------- -------- ------ ------- ----          ------------------- ---------------- ----------------- ------------------- --------------- ------------ ------------- ----------- ---------------- ---------------- ----------------- ---------------- -------------------- ----------------- -------------------- ----------------- -------------------- ---------------- ------------- -------------- ------------ ----------------- ----------------------- --------------------- ----------------- ------------------ ----------------- --------------------- ------------------ --------------- ---------------- --------- ------------- ------------- ---------------- -------------- ------------ ---------- --------------- ------------- ------------- -------------- ------------- ------------------ -------------- -------------- -------------- --------------- ------------- ----------- ------------- --------------- ------------ ------------ ----- --------------- ---------------- ------------- --------------- ---------------- ---------- ---------- ----------- ----------- ----------- ---------------- --------------- ---------------- ---------- ---------- ---------------- ---------------- --------------- ------------ ------------- ----------- ---------------- ---------------- ---------------- -------------------- -------------------- ------------------- ---------------- ----------------- --------------- -------------------- -------------------- --------------------
2024-06-10T01:04:00Z                       hiroshima-01                                 dlp.srv.world 0                   0                0                 80                  0               0            0             80          0                0                0                 0                0                    0                 0                    0                 80                   0                0             0              80           0                 0                       0                     0                 0                  0                 0                     0                  80              80               all       64            2             0                0              0            0          0               18900         0             0              19023         0                  40             0              16347          16347           0             0           0             0                                               51              2                2             9               0                0          18615      -1          22          16063       32               0               1                120000     200        0                0                156             0            0             80          236              0                0                0                    0                    0                   0                0                 0               0                    0                    0
2024-06-10T01:04:00Z 75705160   1014375    hiroshima-01 1319    0        0      0       dlp.srv.world                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       enp1s0                                                                                                                                                                                                                                                                                                         19467        15142        -1                                                                                                                                                                                                                                                                                                                                                                                                                                         
2024-06-10T01:04:10Z                       hiroshima-01                                 dlp.srv.world 0                   0                0                 80                  0               0            0             80          0                0                0                 0                0                    0                 0                    0                 80                   0                0             0              80           0                 0                       0                     0                 0                  0                 0                     0                  80              80               all       64            2             0                0              0            0          0               18920         0             0              19043         0                  40             0              16367          16367           0             0           0             0                                               51              2                2             9               0                0          18635      -1          22          16083       32               0               1                120000     200        0                0                156             0            0             80          236              0                0                0                    0                    0                   0                0                 0               0                    0                    0
2024-06-10T01:04:10Z 75705574   1014459    hiroshima-01 1324    0        0      0       dlp.srv.world                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       enp1s0                                                                                                                                                                                                                                                                                                         19475        15144        -1                                                                                                                                                                                                                                                                                                                                                                                                                                         
2024-06-10T01:04:20Z                       hiroshima-01                                 dlp.srv.world 0                   0                0                 80                  0               0            0             80          0                0                0                 0                0                    0                 0                    0                 80                   0                0             0              80           0                 0                       0                     0                 0                  0                 0                     0                  80              80               all       64            2             0                0              0            0          0               18958         0             0              19081         0                  40             0              16405          16405           0             0           0             0                                               52              2                2             10              0                0          18673      -1          23          16121       33               0               1                120000     200        0                0                156             0            0             80          236              0                0                0                    0                    0                   0                0                 0               0                    0                    0
2024-06-10T01:04:20Z 75705834   1014459    hiroshima-01 1329    0        0      0       dlp.srv.world                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       enp1s0                                                                                                                                                                                                                                                                                                         19480        15144        -1                                                                                                                                                                                                                                                                                                                                                                                                                                         
2024-06-10T01:04:30Z                       hiroshima-01                                 dlp.srv.world 0                   0                0                 80                  0               0            0             80          0                0                0                 0                0                    0                 0                    0                 80                   0                0             0              80           0                 0                       0                     0                 0                  0                 0                     0                  80              80               all       64            2             0                0              0            0          0               18978         0             0              19101         0                  40             0              16425          16425           0             0           0             0                                               52              2                2             10              0                0          18693      -1          23          16141       33               0               1                120000     200        0                0                156             0            0             80          236              0                0                0                    0                    0                   0                0                 0               0                    0                    0
2024-06-10T01:04:30Z 75706094   1014459    hiroshima-01 1334    0        0      0       dlp.srv.world                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       enp1s0                                                                                                                                                                                                                                                                                                         19485        15144        -1                                                                                                                                                                                                                                                                                                                                                                                                                                         
2024-06-10T01:04:40Z                       hiroshima-01                                 dlp.srv.world 0                   0                0                 80                  0               0            0             80          0                0                0                 0                0                    0                 0                    0                 80                   0                0             0              80           0                 0                       0                     0                 0                  0                 0                     0                  80              80               all       64            2             0                0              0            0          0               18999         0             0              19122         0                  40             0              16446          16446           0             0           0             0                                               52              2                2             10              0                0          18714      -1          23          16162       33               0               1                120000     200        0                0                156             0            0             80          236              0                0                0                    0                    0                   0                0                 0               0                    0                    0
2024-06-10T01:04:40Z 75706354   1014459    hiroshima-01 1339    0        0      0       dlp.srv.world                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       enp1s0                                                                                                                                                                                                                                                                                                         19490        15144        -1                                                                                                                                                                                                                                                                                                                                                                                                                                         
.....
.....

root@dlp:~#
influx -username admin -password adminpassword -database telegraf -precision rfc3339 \
-execute 'select * from processes' -ssl -unsafeSsl

name: processes
time                 blocked dc           dead host          idle paging running sleeping stopped total total_threads unknown zombies
----                 ------- --           ---- ----          ---- ------ ------- -------- ------- ----- ------------- ------- -------
2024-06-10T01:04:00Z 0       hiroshima-01 0    dlp.srv.world 67   0      0       69       0       136   172           0       0
2024-06-10T01:04:10Z 1       hiroshima-01 0    dlp.srv.world 67   0      0       68       0       136   172           0       0
2024-06-10T01:04:20Z 1       hiroshima-01 0    dlp.srv.world 67   0      0       68       0       136   172           0       0
2024-06-10T01:04:30Z 1       hiroshima-01 0    dlp.srv.world 67   0      0       68       0       136   172           0       0
2024-06-10T01:04:40Z 1       hiroshima-01 0    dlp.srv.world 67   0      0       68       0       136   172           0       0
2024-06-10T01:04:50Z 1       hiroshima-01 0    dlp.srv.world 67   0      0       68       0       136   172           0       0
2024-06-10T01:05:00Z 1       hiroshima-01 0    dlp.srv.world 67   0      0       68       0       136   172           0       0
2024-06-10T01:05:10Z 1       hiroshima-01 0    dlp.srv.world 67   0      0       68       0       136   172           0       0
2024-06-10T01:05:20Z 0       hiroshima-01 0    dlp.srv.world 67   0      0       69       0       136   172           0       0
2024-06-10T01:05:30Z 1       hiroshima-01 0    dlp.srv.world 67   0      0       68       0       136   173           0       0
2024-06-10T01:05:40Z 1       hiroshima-01 0    dlp.srv.world 67   0      0       68       0       136   173           0       0
.....
.....

root@dlp:~#
influx -username admin -password adminpassword -database telegraf -precision rfc3339 \
-execute 'select * from swap' -ssl -unsafeSsl

name: swap
time                 dc           free       host          in out total      used used_percent
----                 --           ----       ----          -- --- -----      ---- ------------
2024-06-10T01:04:00Z hiroshima-01 4105170944 dlp.srv.world 0  0   4105170944 0    0
2024-06-10T01:04:10Z hiroshima-01 4105170944 dlp.srv.world 0  0   4105170944 0    0
2024-06-10T01:04:20Z hiroshima-01 4105170944 dlp.srv.world 0  0   4105170944 0    0
2024-06-10T01:04:30Z hiroshima-01 4105170944 dlp.srv.world 0  0   4105170944 0    0
2024-06-10T01:04:40Z hiroshima-01 4105170944 dlp.srv.world 0  0   4105170944 0    0
2024-06-10T01:04:50Z hiroshima-01 4105170944 dlp.srv.world 0  0   4105170944 0    0
2024-06-10T01:05:00Z hiroshima-01 4105170944 dlp.srv.world 0  0   4105170944 0    0
2024-06-10T01:05:10Z hiroshima-01 4105170944 dlp.srv.world 0  0   4105170944 0    0
2024-06-10T01:05:20Z hiroshima-01 4105170944 dlp.srv.world 0  0   4105170944 0    0
2024-06-10T01:05:30Z hiroshima-01 4105170944 dlp.srv.world 0  0   4105170944 0    0
.....
.....

root@dlp:~#
influx -username admin -password adminpassword -database telegraf -precision rfc3339 \
-execute 'select * from system' -ssl -unsafeSsl

name: system
time                 dc           host          load1 load15 load5 n_cpus n_unique_users n_users uptime uptime_format
----                 --           ----          ----- ------ ----- ------ -------------- ------- ------ -------------
2024-06-10T01:04:00Z hiroshima-01 dlp.srv.world 0     0      0     2      1              1       2639    0:43
2024-06-10T01:04:10Z hiroshima-01 dlp.srv.world 0     0      0     2      1              1       2649    0:44
2024-06-10T01:04:20Z hiroshima-01 dlp.srv.world 0     0      0     2      1              1       2659    0:44
2024-06-10T01:04:30Z hiroshima-01 dlp.srv.world 0     0      0     2      1              1       2669    0:44
2024-06-10T01:04:40Z hiroshima-01 dlp.srv.world 0     0      0     2      1              1       2679    0:44
2024-06-10T01:04:50Z hiroshima-01 dlp.srv.world 0     0      0     2      1              1       2689    0:44
2024-06-10T01:05:00Z hiroshima-01 dlp.srv.world 0     0      0     2      1              1       2699    0:44
2024-06-10T01:05:10Z hiroshima-01 dlp.srv.world 0     0      0     2      1              1       2709    0:45
2024-06-10T01:05:20Z hiroshima-01 dlp.srv.world 0     0      0     2      1              1       2719    0:45
2024-06-10T01:05:30Z hiroshima-01 dlp.srv.world 0.08  0.01   0.02  2      1              1       2729    0:45
2024-06-10T01:05:40Z hiroshima-01 dlp.srv.world 0.07  0      0.02  2      1              1       2739    0:45
2024-06-10T01:05:50Z hiroshima-01 dlp.srv.world 0.06  0      0.01  2      1              1       2749    0:45
2024-06-10T01:06:00Z hiroshima-01 dlp.srv.world 0.05  0      0.01  2      1              1       2759    0:45
.....
.....
関連コンテンツ