1. Splunk 설치하기
1.1. Splunk
Download
1.2. Splunk
Start
1.3. Splunk 접속
2. Splunk DB
Connect 설치하기
2.1. Splunk DB
Connect Overview
Splunk
DB Connect delivers reliable, scalable, real-time integration between Splunk
Enterprise and relational databases. Integrate structured data from relational
databases with data in Splunk Enterprise to drive deeper levels of analysis and
operational intelligence.
2.2. Splunk DB
Connect앱 설치
선택이
완료되면 “열기” 버튼을 클릭하고, “업로드” 버튼을 클릭하면 앱의 설치가 시작된다.
2.3. 기본환경 설정
Splunk
로고를 클릭하여 Main화면으로 이동하면 Splunk
DB Connect Panel이 표시 된다.
3. SUNDB와 Splunk연결하기
3.1. JDBC 드라이버
복사하기
Splunk에 SUNDB를 연결하기 위해 사전에 SUNDB용 JDBC Dirver 파일이 필요하다. JDBC파일을 Splunk DB Connect가 설치된 디렉토리의 Library에
복사하여 넣어 둔다. Default로 앱을 설치한 경우 “$SPLUNK_HOME/etc/apps/dbx/bin/lib/
디렉토리에 복사하면 된다.
3.2. 프로파일 설정하기
“$SPLUNK_HOME/etc/apps/dbx/default/database_types.conf
파일에 프로파일을 설정한다. README파일을 참고하여 작성하면 된다.
# Copyright (C) 2005-2014 Splunk Inc. All Rights
Reserved.
[default]
[mssql]
displayName = Microsoft SQL Server
typeClass =
com.splunk.dbx.sql.type.impl.MicrosoftSqlServer
[odbc]
displayName = ODBC
typeClass = com.splunk.dbx.sql.type.impl.ODBC
[sqlite]
displayName = SQLite
typeClass = com.splunk.dbx.sql.type.impl.SQLite
local = 1
[oracle]
displayName = Oracle
typeClass = com.splunk.dbx.sql.type.impl.Oracle
defaultCatalogName = ORCL
[mysql]
displayName = MySQL
typeClass = com.splunk.dbx.sql.type.impl.MySQL
testQuery = SELECT 1
defaultCatalogName = mysql
defaultPort = 3306
[postgresql]
displayName = PostgreSQL
jdbcDriverClass = org.postgresql.Driver
defaultPort = 5432
connectionUrlFormat =
jdbc:postgresql://{0}:{1}/{2}
testQuery = SELECT 1 AS test
defaultCatalogName = postgres
defaultSchema = public
streamingFetchSize = 100
streamingAutoCommit = false
[db2]
displayName = DB2
typeClass = com.splunk.dbx.sql.type.impl.DB2
defaultPort = 3700
[informix]
displayName = Informix
typeClass = com.splunk.dbx.sql.type.impl.Informix
defaultPort = 1526
[SUNDB]
displayName = SUNDB
jdbcDriverClass =
sunje.sundb.jdbc.SundbDriver
defaultPort = 22581
connectionUrlFormat =
jdbc:sundb://{0}:{1}/{2}
testQuery = select 1 from
dual
defaultCatalogName = test
defaultSchema = test
streamingAutoCommit = false
|
SUNDB
프로파일을 추가한다. defaultPort는 SUNDB의
서비스 리스너 포트를 등록한다.
3.3. SUNDB 연결
입력필드에 SUNDB 연결 정보를 입력한다.
구분
|
값
|
비고
|
이름
|
sundb
|
Description
|
Database Type
|
SUNDB
|
SUNDB 선택
|
Transaction Isolation Level
|
DATABASE_SETTING
|
|
Host
|
127.0.0.1
|
SUNDB가 설치된 서버의 IP를
입력
|
포트
|
22581
|
SUNDB 서비스 리스너의 포트 설정
|
사용자 이름
|
TEST
|
SUNDB UserID
|
암호
|
test
|
SUNDB PASSWORD
|
암호 확인
|
test
|
|
Database
|
Test
|
연결정보를
입력하고 “저장” 버튼을 클릭한다.
SUNDB의
설정이 완료되면 External Databases 목록에 SUNDB 정보가
표시 된다.
3.4. SUNDB에서
검색 하기
Splunk
DB Connect Panel에서 “Database Query” 를 선택한다. Database Query검색화면이 표시되면 “Database” 부분에서
“sundb”를 선택하고, SQL을 입력하여 SUNDB에서 데이터를 검색할 수 있다.