执行root@debian:~# /usr/bin/php /var/www/html/cacti/poller.php后提示读取spine配置文件错误!
详细报错信息如下:
root@debian:~# /usr/bin/php /var/www/html/cacti/poller.php
2023-01-09 13:41:57 - SYSTEM STATS: Time:7.6089 Method:spine Processes:6 Threads:6 Hosts:169 HostsPerProcess:29 DataSources:102 RRDsProcessed:0
root@debian:~# /usr/local/spine/bin/spine
2023/01/09 13:42:29 - SPINE: Poller[1] PID[1232862] FATAL: Unable to read configuration file! (Spine init)
root@debian:~# ^C
后台系统设置路径没问题,系统能够识别到
原因:spine默认配置文件需要放在/etc才会生效
将spine.conf配置文件拷贝到/etc下一份即可。
root@debian:~# cp /usr/local/spine/etc/spine.conf /etc/spine.conf
2023-01-09 13:45:03 - SPINE: Poller[1] PID[1233950] Device[204] HT[1] Total Time: 0.11 Seconds
2023-01-09 13:45:03 - SPINE: Poller[1] PID[1233950] Device[204] HT[1] DEBUG: HOST COMPLETE: About to Exit Device Polling Thread Function
2023-01-09 13:45:03 - SPINE: Poller[1] PID[1233950] DEBUG: The Value of Active Threads is 5 for Device ID 204
2023-01-09 13:45:03 - SPINE: Poller[1] PID[1233950] DEBUG: In Poller, About to Start Polling of Device for Device ID 205
2023-01-09 13:45:03 - SPINE: Poller[1] PID[1233950] Device[205] DEBUG: Entering SNMP Ping
2023-01-09 13:45:03 - SPINE: Poller[1] PID[1233950] NOTE: Device[205] Updating Full System Information Table
2023-01-09 13:45:03 - SPINE: Poller[1] PID[1233950] Device[205] HT[1] RECACHE: Processing 1 items in the auto reindex cache for ''
2023-01-09 13:45:03 - SPINE: Poller[1] PID[1233950] Device[205] HT[1] DQ[4] RECACHE OID: .1.3.6.1.2.1.1.3.0, (assert: 1090974628 < output: 1090980577)
2023-01-09 13:45:03 - SPINE: Poller[1] PID[1233950] Device[205] HT[1] Total Time: 0.034 Seconds
2023-01-09 13:45:03 - SPINE: Poller[1] PID[1233950] Device[205] HT[1] DEBUG: HOST COMPLETE: About to Exit Device Polling Thread Function
2023-01-09 13:45:03 - SPINE: Poller[1] PID[1233950] DEBUG: The Value of Active Threads is 5 for Device ID 205
SPINE: Time: 8.9167 s, Threads: 6, Devices: 170