2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
- 初始化操作
- systemctl disable --now firewalld
- setenforce 0
- vim /etc/selinux/config
- SELINUX=disabled
- cd /opt
- grafana-enterprise-9.4.7-1.x86_64.rpm #上传软件包
- yum localinstall -y grafana-enterprise-9.4.7-1.x86_64.rpm #安装
- systemctl enable --now grafana-server.service #开启服务
- netstat -lntp | grep 3000 #查询是否已经开启服务
Intra in navigatro http://192.168.10.50:3000
Ratio / Password: Administrator / admin
Revertere deinde ad interfacies Plugins, zabbix inauguratus est
Tantum monitores duas civitates CPU et hic mediocris onus.
Numerum cpu nucleorum modificare directe mutari non potest.
Hoc modo numerum CPUs monere potes
Operationes posteriores fere idem sunt.
Extremum exitum est sic
Comparatus cum zabbix, facilius statum specificum observare est
Ad vigilantiam nginx efficiendum, oportet primum hanc configurationem habere--with http stipulas status moduli
- vim /etc/nginx/conf.d/default.conf
-
- location / {
- root /var/www/zbx;
- index index.php index.html index.htm;
- }
- systemctl reload nginx.service
-
- curl -s http://192.168.10.20/nginx_state
- vim nginx_status.sh
-
- chmod +x nginx_status.sh
-
- ./nginx_status.sh waiting
Scriptor ad deprehendere nginx status
- #!/bin/bash
- IP=192.168.10.20
- PORT=80
- STUB_URI=nginx_state
-
- active() {
- curl -s http://$IP:$PORT/$STUB_URI | awk 'NR==1 {print $3}'
- }
-
- accepts() {
- curl -s http://$IP:$PORT/$STUB_URI | awk 'NR==3 {print $1}'
- }
-
- handled() {
- curl -s http://$IP:$PORT/$STUB_URI | awk 'NR==3 {print $2}'
- }
-
- requests() {
- curl -s http://$IP:$PORT/$STUB_URI | awk 'NR==3 {print $3}'
- }
-
- Reading() {
- curl -s http://$IP:$PORT/$STUB_URI | awk 'NR==4 {print $2}'
- }
-
- writing() {
- curl -s http://$IP:$PORT/$STUB_URI | awk 'NR==4 {print $4}'
- }
-
- waiting() {
- curl -s http://$IP:$PORT/$STUB_URI | awk 'NR==4 {print $6}'
- }
-
- process() {
- pidof nginx | wc -w
- }
-
- case $1 in
- active)
- active
- ;;
- accepts)
- accepts
- ;;
- handled)
- handled
- ;;
- requests)
- requests
- ;;
- Reading)
- Reading
- ;;
- Writing)
- writing
- ;;
- Waiting)
- waiting
- ;;
- process)
- process
- ;;
- *)
- echo "Usage: $0 {active|accepts|handled|requests|Reading|writing|waiting|process}" exit 1
- esac
- exit 0
Cognoscere quod status videri potest
- vim nginx_state.conf
-
- UserParameter=nginx.status[*],/etc/zabbix/zabbix_agent2.d/nginx_status.sh $1
(I) Create template
(II) magna items crea
(III) crea felis