No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

OceanStor BCManager 6.5.0 eReplication User Guide 02

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Connecting to ELK

Connecting to ELK

ELK consists of ELK-Server and ELK-Agent. To interconnect eReplication with ELK, you must install ELK-Agent on each eReplication node.

Prerequisites

  • The user name and password used to log in to the UI of ELK have been obtained.
  • The hosts on which ELK-Agent is to be installed have the same root account and password and DRManager account and password.
  • The hosts on which ELK-Agent is to be installed have the SFTP-based file transfer permission.
  • A DMK system has been deployed on the live network, and an account belonging to the O&M Tool Development (OTD) group has been created.
  • The version of a corresponding ELK software package has been obtained.
  • The IP address, user name, and password for logging in to DMK have been obtained.
  • An eReplication server has been successfully deployed.
  • The IP address of the ElasticSearch VM and the IP addresses of the two Redis VMs on the ELK-Server have been obtained.
  • The IP address, DRManager account and password of eReplication node where ELK-Agent will be installed have been obtained.
  • The ES node IP address of ELK has been obtained.

Context

ELK is a log collection platform developed based on ElasticSearch, Logstash, and Kibana. Users can use ELK to collect logs of components and services, or use ELK and Hound to analyze logs for fault demarcation and locating.

Data Preparation

Table 2-26 describes parameters required for connecting to ELK.
Table 2-26  Parameter description

Category

Parameter

Description

Configuration Example

Configuration file

remote_ssh_user

User name used for logging in to the host through SSH

DRManager

service_name

Name of the service provided by the host to be installed (consistent with the ELK configuration)

ereplicationconsole

redis_ip

List of IP addresses of Redis VMs to which the host reports logs. The IP addresses are enclosed by single quotation marks ('), each IP address is enclosed by double quotation marks ("), and IP addresses are separated from each other using commas (,).

"162.31.32.21","162.31.32.22"

old_logstash_install_path

ELK-Agent installation directory specified when uninstalling ELK-Agent

/opt/logstash

Node configuration file

IP address of a management node

Management IP address of the eReplication management node on which ELK-Agent is to be installed

172.80.65.65

172.80.65.66

NOTE:
For parameters not described in Table 2-26, use their default values.

Procedure

  1. Use the administrator account to log in to DMK.

    In the address box of a browser, enter https://IP address of DMK:8843. On the DMK login page, enter the user name, password, and verification code, and click Login.

    NOTE:

    If the user has not performed any operations for a long time after the successful login, the system will log out the user for security.

  2. Add a host account.
    1. In the navigation tree, choose Accounts.
    2. Click Add Account.

      The Add Account page is displayed.

    3. Add user DRManager and add this account to the OTD group by referring to Table 2-27.

      Table 2-27  Parameters for user DRManager adding

      Parameter

      Description

      Remarks

      Account Name

      System deployment account. The default value is DRManager.

      This account is used to connect to the remote node and execute the deployment and upgrade.

      DRManager

      Description

      Used to distinguish accounts of the same name.

      The value is user-defined.

      The value is user-defined.

      Teams

      Team to which the account belongs.

      Select the OTD group.

      Type

      • Password: Select this option if the to-be-upgraded node authenticates login users by their user names and passwords.

      • Key-Pair: Select this option if the to-be-upgraded node authenticates login users using key files.

      Select Password.

      Password

      Password of the SSH user.

      Huawei@CLOUD8

      Confirm Password

      Enter the SSH password again.

      Huawei@CLOUD8

      Sudo Username

      Sudo user name, which is root.

      root

      Sudo Password

      Sudo password.

      Huawei@CLOUD8!

    4. Click OK to finish adding the account.
  3. Install the ELK-Agent.
    1. In the navigation tree, choose Deploy Guide.
    2. On the Service Configuration tab page, click the Services tab, and select ELK-Agent.

      Table 2-28 describes the parameters.

      Table 2-28  Parameter description

      Name

      Description

      Example Value

      Select Version

      Select the version of the software package that is deployed and configured.

      x.x.x.x

      Select Action

      Select the operation needs to be performed, including Full-Install and Logstash-Install.

      Full-Install

      Select Region

      Select a region for this operation.

      local

      Host Repository

      Keep the default value.

      No

      Gray Deployment

      Keep the default value.

      No

    3. Click Next. The Hosts and User Configuration page is displayed.
    4. Specify the owning team and added account as follows:

      • Team: Select OTD.
      • Account: Select user DRManager created in 2.

    5. Modify the configuration file.

      1. In the Configuration File area, click . The system displays two file configuration boxes.
        NOTE:

        For the initial installation of a service using DMK, the left configuration box in Figure 2-7 is blank. You need to copy the information in the right configuration box to the left configuration box.

        For later installations, Configuration File Template is provided in the right configuration box, and the actual configuration in the last time deployment is provided in the left configuration box, which will be used in this deployment. Click to copy parameter values of Configuration File Template in the right configuration box to the left.

      2. Modify parameters in the configuration file in the left by referring to Figure 2-7.

        Figure 2-7  Configuration file
        • Change the remote_ssh_user value to DRManager.
        • Change the service_name value to eReplication.
        • Change the redis_ip value to be the IP addresses of the two Redis VMs and separate the IP addresses with a comma (,).

    6. Modify configuration files for hosts.

      1. In the Hosts Configuration File area, click .
      2. Modify parameters in the node configuration file by referring to Figure 2-8.
        Figure 2-8  Host configuration file
        • Change the method value to su.
        • Under method, add information about eReplication nodes.

    7. Click Execute > OK to start installing the ELK-Agent.

      • After the installation is complete, the installation result is displayed in the upper left corner.



      • If the system displays the message local(Failed), handle the failure as prompted and then upload the software package again.

  4. Use PuTTY to log in to the background of the host where the ELK-Agent will be installed and run the following command to switch to user root.

    su - root

  5. Run the following command to check whether processes are started:

    ps -efww|grep -v grep|grep logstash-shipper

    If a command output similar to the following is displayed, processes have been started successfully:
    root 116327 1 75 17:36 ? 00:00:24 /opt/jdk//bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Xmx500m -Xss2048k -Djffi.boot.library.path=/opt/logstash/logstash-2.4.0/vendor/jruby/lib/jni -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/logstash/logstash-2.4.0/heapdump.hprof -Xbootclasspath/a:/opt/logstash/logstash-2.4.0/vendor/jruby/lib/jruby.jar -classpath : -Djruby.home=/opt/logstash/logstash-2.4.0/vendor/jruby -Djruby.lib=/opt/logstash/logstash-2.4.0/vendor/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main --1.9 /opt/logstash/logstash-2.4.0/lib/bootstrap/environment.rb logstash/runner.rb agent -f /opt/logstash/logstash-2.4.0/bin/..//config/logstash-shipper.conf --log /var/log/logstash/logstash.log

  6. Run the following command to check whether a path for saving monitoring logs exists in the configuration file. If a path for saving monitoring logs exists, ELK-Agent is installed. Otherwise, perform the following steps.

    cd /opt/logstash/logstash-*/config

    vi logstash-shipper.conf

    input {
        file {
            type => "messages"
            path => [
                "/var/log/message", 
                "/var/log/zabbix/*.log", 
                "/opt/BCManager/Runtime/bin/logs/*.log",
                "/opt/BCManager/Runtime/LegoRuntime/logs/*.log",
                "/opt/BCManager/Runtime/logs/*.log",
                "/opt/BCManager/Runtime/Tomcat6/logs/*.log" 
            ]
            exclude => "*.gz"
            sincedb_write_interval => 15
        }
        heartbeat{
            interval => 10
            type => "heartbeat"
        }
    }
    

  7. Modify the configuration file. In the square brackets containing the path, add the following information and save the file.

    "/var/log/message", 
    "/var/log/zabbix/*.log", 
    "/opt/BCManager/Runtime/bin/logs/*.log",
    "/opt/BCManager/Runtime/LegoRuntime/logs/*.log",
    "/opt/BCManager/Runtime/logs/*.log",
    "/opt/BCManager/Runtime/Tomcat6/logs/*.log" 
    

  8. Run the following command to restart the process.

    bash /opt/logstash/logstash-2.4.0/bin/stop_shipper.sh

    bash /opt/logstash/logstash-2.4.0/bin/start_shipper.sh

Follow-up Procedure

Verifying the Interconnection Result

After interconnecting eReplication with ELK, you need to check whether they are interconnected successfully.

  1. Log in to the ELK GUI.
    Use the IP address of an ElasticSearch VM and the port ID 5601 for login. For example, https://192.168.208.200:5601.
    NOTE:
    The two ElasticSearch VMs in the same cluster work in active-active mode. Use the IP address of either of them for login.
  2. On the ELK GUI, choose Log Search, and enter the IP address of the ELK-Agent in the Host IP text box.
  3. Click the search icon . If logs of eReplication are displayed correctly, eReplication has been interconnected with ELK successfully.
Translation
Download
Updated: 2019-05-21

Document ID: EDOC1100075861

Views: 10671

Downloads: 55

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next