Cacti settings and spine posters

Source: Internet
Author: User
Tags ldap remote ftp server rrd rrdtool

Cacti settings

The cacti series in the previous article explains that there are two sub-projects in the configuration options: settings and plugin management. Click settings. The following page is displayed.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/45/57/wKiom1PoDdGwpcgIAAQaoHPu__g367.jpg "Title =" 1.png" alt = "wkiom1poddgwpcgiaaqaohpu__g367.jpg"/>

As we can see, the arrow points to the place where we can set these projects.

First, let's take a look at "General", general configuration, and configuration mainly includes the following items:

  • Logs

  • SNMP-related settings

  • Other configurations

In fact, there is basically no need to modify it here, just keep the default configuration. If you need to modify the file, that is, "required tool versions" and "SNMP defaults", modify the file and click "save ".


Next, let's look at the "path" option. Obviously, this is related to the path. The main configuration content is:

  • Path of required tools (SNMP, rrdtool, PHP)

  • Cacti log file storage path

  • Spine polling optimizer path (which will be explained immediately in the following content)

  • Structured RRD path (If this option is selected, the RRD file of each host is stored in a directory separately)

We can see that the configuration path here is consistent with that detected at the beginning of cacti installation and initialization. Keep all configurations by default.

The only thing we need to change below is the alternate poller path. Remember, let's talk about it later.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/45/57/wKiom1PoEbmBnyzZAAA98ULKqu4901.jpg "Title =" 1.png" alt = "wkiom1poebmbnyzzaaa98ulkqu4901.jpg"/>


Next, let's take a look at the "poller" option. The configuration of the cacti collector includes:

  • General Configuration

  • Collector parameter settings

  • Host High Availability Configuration

  • Host online/down configuration

In the poller configuration, we can select "poller type" (collector type), cmd. php and poller. php collectors. This collector is written in PHP and has simple functions. The other is the spine collector, which is multi-threaded and highly efficient and suitable for large-scale monitoring. After a while, we will introduce in detail the installation and use of spine.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/45/57/wKiom1PoG52T2w64AAEjjE4JCxk324.jpg "Title =" 1.png" alt = "wkiom1pog52t2w64aaejje4jcxk324.jpg"/>


Next is the "graphs export" option, where can we export the generated image. It can be exported to a local computer or a remote FTP server. The main configuration options include:

  • General Configuration

  • Graph Tree Configuration

  • Thumbnail Configuration

  • Path Configuration

  • Configure ftp options for export time, etc.

We generally do not need to export images.


The following is the "visual" option, which mainly sets how the cacti page is displayed.

  • Graphical Management Configuration

  • Data Query Configuration

  • Graph creation Configuration

  • Data Source display Configuration

  • Host display Configuration

  • Log Management Configuration

  • Default rrdtool Configuration

Keep the default configuration.


Finally, we will explain the "authentication" option. There are four authentication methods:

  • No authentication method, all users will have all access permissions (dangerous)

  • Built-in authentication cacti controls user authentication, which allows you to establish users and set their permissions to access cacti.

  • Web Basic Authentication uses Apache to control user authentication. If a template user is defined, the new user will be created during the First Login. Otherwise, the defined Guest user permissions will be used.

  • LDAP Authentication allows you to pass authentication to the ladp server. If a template user is defined, a new user will be created during the first logon. Otherwise, the defined Guest user permissions will be used, if the LDAP module of PHP is not enabled, no LDAP authentication will appear in the drop-down menu.

Generally, we choose built-in verification.


Enable Anonymous user access: Guest

Step 1: User Management-> the user list is displayed. Click "User Name"

User Management-> click "guest". The following page is displayed. Check enabled.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/45/58/wKioL1PoIZbAUd7DAAQEr64sTJs123.jpg "Title =" 1.png" alt = "wkiol1poizbaud7daaqer64stjs123.jpg"/> Step 2: Set default permissions for graph and so on. That is, configure the access permissions for each of the enclosed options.


Cacti-optimized spine posters

For efficiency reasons, if you need to collect a large amount of data, use the built-in cmd. the PHP polling server is slow, and the collection frequency once per minute may not be able to complete polling for all the monitored machines. To solve the efficiency problem, cacti also released the official spine, which adopts multi-thread efficient round robin.

The official document: http://www.cacti.net/spine_install.php is introduced directly here


Spine Installation

Spine needs to be compiled before it can be used. If you found a Binary Package of spine for your operating system, you can skip the next step about compiling spine.

Compiling spine

  • Compiling spine for windows under cygwin

  • Compiling spine for Redhat/Fedora Linux


Compiling spine for Redhat/Fedora Linux

Before you continue, check if any pre-compiled packages are available for your version of RedHat/Fedora Linux. These instructions will help you compile spine from source if no Binary packages are available.

Prerequisites

Make sure that the following packages are installed before attempting to compile spine:

  • Net-snmp-devel

  • MySQL

  • Mysql-devel

  • OpenSSL-devel

Compiling spine

Download the latest source distribution of spine and run the following commands to get a working binary:

Tar xvzf cacti-spine-0.8.7.tar.gz
CD spine-0.8.7
./Configure
Make

Now you must move your new binary,SpineAndSpine. confTo a more permanent home such/Usr/local/spine. EditSpine. confFile and specify your database connection information for cacti.

You shoshould now be ready to start using spine!

Setting up spine

Once spine is installed on your system, you must perform the following steps to make your cacti installation aware of it.

  1. Login to cacti asAdminUser.

  2. SelectSettingsOn the menu and clickPathsTab.

  3. EnterCompletePath to your spine binary inSpine poller file pathField and clickSave.

  4. ClickPollerTab.

  5. Choose "spine" fromPoroller typeDropdown box and clickSave.

After completing these steps, cacti will spawn spine every 5 minutes instead of CMD. php. If you are having problems getting spine to gather data, you can always temporarily changePoroller typeBack to "cmd. php ".


Some students may feel dizzy when they look at English.

1. Resolve Dependencies

# Dependent on MySQL mysql-devel net-snmp-devel OpenSSL-devel # We have installed MySQL mysql-devel when installing cacti, here, you only need to install the other two [email protected] ~] # Yum-y install net-snmp-devel OpenSSL-devel

2. Install spine, The download version is better than cacti, spine-0.8.8b

[[email protected] ~]# tar xf cacti-spine-0.8.8b.tar.gz [[email protected] ~]# cd cacti-spine-0.8.8b[[email protected] cacti-spine-0.8.8b]# ./configure[[email protected] cacti-spine-0.8.8b]# make && make install

3. Provide configuration files

[[Email protected] ~] # Cp/usr/local/Spine/etc/spine. conf. Dist/etc/spine. conf # edit the configuration file. modify the configuration file as needed [[email protected] ~] # Vi/etc/spine. conf db_host localhostdb_database cactidb_user cactiuserdb_pass cactiuserdb_port 3306db_preg 0 # How does the configuration come from here? Remember, it's CACTI/include/config. PHP/* Make sure these values refect your actual database/host/user/password */$ database_type = "MySQL"; $ database_default = "cactidb"; $ database_hostname = "localhost "; $ database_username = "cactiuser"; $ database_password = "cactiuser"; $ database_port = "3306"; $ database_ssl = false;

4. Test

[[Email protected] ~] #/Usr/local/Spine/bin/spine # the following error occurs: mysql: Connection Failed: Error: '000000', message: 'Can't connect to MySQL server on 'Shuttle '(61) '2017/24/60 07:14:22-spine: poller [0] fatal: Connection Failed, error: '123 ', message: 'Can't connect to MySQL server on 'Shuttle '(61)' (spine init) # Google you probably checked it out already but make sure: db_host 127.0.0.1and notdb_host localhost

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/45/5B/wKioL1PoK5_RMHa4AABsxGQF3o0675.jpg "Title =" 1.png" alt = "wkiol1pok5_rmha4aabsxg1_3o0675.jpg"/>

OK. test again:

[[email protected] ~]# /usr/local/spine/bin/spine SPINE: Using spine config file [/etc/spine.conf]SPINE: Version 0.8.8b startingSPINE: Time: 0.1707 s, Threads: 5, Hosts: 2[[email protected] ~]#

5. Set the spine path on the cacti web page.

As mentioned above.

Console-> configureation-> Settings-> alternate poller path-> spine poller file path

Enter the spine path: Installed in/usr/local/Spine/bin/spine by default

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/45/5A/wKiom1PoK5iRqptOAAFQqsCfm8g626.jpg "Title =" 1.png" alt = "wkiom1pok5irqptoaafqqscfm8g626.jpg"/>

6. Modify the default poller types of cacti.

Console-> cacti settings-> poller type

In the drop-down box, select spine and remember "save"

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/45/5B/wKioL1PoLTDh7Q8PAACj-QuoBLk804.jpg "Title =" 1.png" alt = "wKioL1PoLTDh7Q8PAACj-QuoBLk804.jpg"/>

Note:Spine does not have to add scheduled tasks to it, Cacti well spawn spine every 5 minutes instead of CMD. php

Poller. php needs to define a scheduled task for execution, and then poller. php then schedules the data collection method.


Now, it's over.

This article is from the share your knowledge blog, please be sure to keep this source http://skypegnu1.blog.51cto.com/8991766/1538459

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.