데이터 시각화, 성능 최적화
정보에 입각한 의사 결정을 내리고 시스템 성능을 향상하며 문제 해결을 간소화하는 오픈 소스 데이터 시각화
O/S
Shell
1 2 |
[root@localhost ~]# cat /etc/redhat-release Rocky Linux release 8.8 (Green Obsidian) |
1. yum repo 추가
Shell
1 2 3 4 5 6 7 8 9 10 11 12 |
[root@localhost ~]# vi /etc/yum.repos.d/grafana.repo [grafana] name=grafana baseurl=https://packages.grafana.com/oss/rpm repo_gpgcheck=1 enabled=1 gpgcheck=1 gpgkey=https://packages.grafana.com/gpg.key sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt |
2. yum grafana install
Shell
1 |
[root@localhost ~]# yum install grafana |
3. 버전 확인
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
[root@localhost ~]# rpm -qi grafana Name : grafana Version : 10.1.5 Release : 1 Architecture: x86_64 Install Date: 2023년 10월 19일 (목) 오후 06시 33분 48초 Group : default Size : 374908208 License : AGPLv3 Signature : RSA/SHA512, 2023년 10월 12일 (목) 오전 01시 44분 15초, Key ID 963fa27710458545 Source RPM : grafana-10.1.5-1.src.rpm Build Date : 2023년 10월 12일 (목) 오전 01시 43분 26초 Build Host : localhost Relocations : / Packager : contact@grafana.com Vendor : "Grafana Labs" URL : https://grafana.com Summary : Grafana Description : Grafana |
4. 서비스 등록 및 서비스 시작
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[root@localhost ~]# systemctl enable --now grafana-server [root@localhost ~]# systemctl start grafana-server [root@localhost ~]# systemctl status grafana-server.service ● grafana-server.service - Grafana instance Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2023-10-19 18:35:07 KST; 3 days ago Docs: http://docs.grafana.org Main PID: 20798 (grafana) Tasks: 14 (limit: 22788) Memory: 106.3M CGroup: /system.slice/grafana-server.service └─20798 /usr/share/grafana/bin/grafana server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid |
Shell
1 2 |
[root@localhost ~]# netstat -anp | grep grafana tcp6 0 0 :::3000 :::* LISTEN 20798/grafana |
웹페이지 접속 ( 초기 패스워드 admin / admin )
환경설정 파일
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
#Installs configuration file [root@localhost ~]# ls -l /etc/grafana/grafana.ini -rw-r----- 1 root grafana 62318 10월 19 18:33 /etc/grafana/grafana.ini #The default configuration sets the log file [root@localhost ~]# ls -l /var/log/grafana/grafana.log -rw-r----- 1 grafana grafana 28244 10월 23 11:25 /var/log/grafana/grafana.log #### The default configuration specifies a sqlite3 [root@localhost ~]# ls -l /var/lib/grafana/grafana.db -rw-r----- 1 grafana grafana 1298432 10월 23 11:25 /var/lib/grafana/grafana.db ### html/css/js [root@localhost ~]# ls -l /usr/share/grafana/ -rw-r--r-- 1 root root 5427 10월 12 01:43 Dockerfile -rw-r--r-- 1 root root 34523 10월 12 01:43 LICENSE -rw-r--r-- 1 root root 105 10월 12 01:43 NOTICE.md -rw-r--r-- 1 root root 3157 10월 12 01:43 README.md -rw-r--r-- 1 root root 8 10월 12 01:43 VERSION drwxr-xr-x 2 root root 4096 10월 19 18:33 bin drwxr-xr-x 3 root root 4096 10월 19 18:33 conf drwxr-xr-x 3 root root 4096 10월 19 18:33 docs drwxr-xr-x 2 root root 4096 10월 19 18:33 npm-artifacts drwxr-xr-x 7 root root 4096 10월 19 18:33 packaging drwxr-xr-x 3 root root 4096 10월 19 18:33 plugins-bundled drwxr-xr-x 16 root root 4096 10월 19 18:33 public |