Commit c1452ba6 authored by JooHan Hong's avatar JooHan Hong

TSDB init

parent 20c16017
Pipeline #5742 passed with stages
in 1 minute and 4 seconds
[![logo](https://www.hongsnet.net/images/logo.gif)](https://www.hongsnet.net)
# TSDB 데이터정합성 Overview
`Telegraf Kafka Consumer` 환경에서는 **InfluxDB 로의 데이터 입수가 동시에 가능** 하다. 그럼, Main/Backup InfluxDB의 데이터 정합성이 맞는지 다음과 같이 검증 한다.
# TSDB 데이터정합성 Check Script
```bash
# cat influxdb_query.sh
#!/bin/bash
MAIN_IP="MAIN InfluxDB 주소"
BACKUP_IP="BACKUP InfluxDB 주소"
USER_ID="DB_사용자"
USER_PW="DB_패스워드"
echo "Main InfluxDB Result: "
influx -execute 'SELECT COUNT(numa_hit) FROM kernel_vmstat' -database="디비명" -precision=rfc3339 -username $USER_ID -password $USER_PW -host $MAIN_IP -port 8086
echo
echo "Backup InfluxDB Result: "
influx -execute 'SELECT COUNT(numa_hit) FROM kernel_vmstat' -database="디비명" -precision=rfc3339 -username $USER_ID -password $USER_PW -host $BACKUP_IP -port 8086
```
위 스크립트 결과는 다음과 같다.
```bash
# ./influxdb_query.sh
Main InfluxDB Result:
name: kernel_vmstat
time count
---- -----
1970-01-01T00:00:00Z 7490387
Backup InfluxDB Result:
name: kernel_vmstat
time count
---- -----
1970-01-01T00:00:00Z 7490387
```
위와 같이 Main/Backup InfluxDB 간의 **데이터 정합성에 문제가 없다**.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment