[monitoring] cacti-spine 설치 및 설정

Cacti-spine 설치

 

기존 cmd.php 사용시 모니터링 장비가 늘어날 경우 모니터링을 할수 없는 현상이 발생할수 있습니다.

 

참고자료

https://www.cacti.net/downloads/docs/html/using_spine.html

Chapter 15. Spine

Spine is the fast replacement for cmd.php. It is written in C to ensure ultimate performance for device polling. Expect a decrease in polling time of an order of magnitude. Polling times far less than 60 seconds for about 20,000 data sources are achievable e.g. on a dual XEON system supplied with 4 GB RAM and standard local disks.

 

When using Spine, don’t change crontab settings! Always use poller.php with crontab! To activate Spine instead of cmd.php, please visit Settings and select the Poller tab. Select Spine and save. Now, poller.php will use Spine on all subsequent polling cycles.

 

While Spine is really fast, choosing the correct setup will ensure, that all processor resources are used. Required settings for Maximum Concurrent Poller Processes are 1-2 times the number of CPU cores available for Spine.

 

 

 

 

Table 15-1. Spine Specific Execution Parameters

Maximum Threads per Process

The maximum threads allowed per process. Using a higher number when using Spine will improve performance. Required settings are 10-15. Values above 50 are most often insane and may degrade preformance

Number of PHP Script Servers

The number of concurrent script server processes to run per Spine process. Settings between 1 and 10 are accepted. Script Servers will pre-load a PHP environment. Then, the Script Server Scripts are included into that environment to save the overhead of reloading PHP each and every time.

Script and Script Server Timeout Value

The maximum time that Spine will wait on a script to complete, in units of seconds. If a Script Server Script is terminated due to timeout conditions, the value entered into the rrd file will be NaN

The Maximum SNMP OID’s Per SNMP Get Request

The maximum number of snmp get OID’s to issue per snmp request. Increasing this value speeds poller performance over slow links. The maximum value is 60 OID’s. Please bear in mind, that some type of devices do not accept huge OID numbers and may fail if set above 1. That’s why cacti 0.8.7 allows to define this value at device level

 

cacti-spine 설치

root@bsd11:~ # whereis cacti-spine
cacti-spine: /usr/ports/net-mgmt/cacti-spine
root@bsd11:~ # cd /usr/ports/net-mgmt/cacti-spine/ && make install clean

 

설치 완료후 메세지

Installing spine-1.1.27...
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/bin/spine

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
https://cacti.net/spine_info.php
===>  Cleaning for spine-1.1.27
root@bsd11:/usr/ports/net-mgmt/cacti-spine #

/usr/local/etc/spine.conf 를 설정 합니다.

root@bsd11:/usr/ports/net-mgmt/cacti-spine # rehash
root@bsd11:/usr/ports/net-mgmt/cacti-spine # vi /usr/local/etc/spine.conf
DB_Host                 localhost
DB_Database             cacti
DB_User                 cacti
DB_Pass                 password
DB_Port                 3306

 

Web 브라우저 설정

Configuration -> Settings -> 상위 메뉴 Poller 에서 poller Type 를 spine 으로 변경

Poller Interval 의 경우 Every Minute 으로 변경 합니다. 

Maximum Threads per Process
(The maximum threads allowed per process. Using a higher number when using Spine will improve performance)

Default 1 -> 16 변경

Number of PHP Script Servers
(The number of concurrent script server processes to run per Spine process. Settings between 1 and 10 are accepted. This parameter will help if you are running several threads and script server scripts)

Default 1 -> 8 변경

 

댓글 남기기