Installing the central logging server on a compute node

Complete the following steps to install CLS on a compute node.

Procedure

  1. Specify the IP address of the system where you want to install CLS in your environment file: your-environment-name.json.
    "default_attributes": {
    
        "ibm-cls": {
          "log_file": {
            "poll_interval": 10,
            "logrotate": {
              "file_size": "10M",
              "rotate_count": 10
            }
          },
          "iptables": {
            "enabled": true
          },
          "elasticsearch": {
            "server_ip": "<CHANGEME>",
            "server_port": "9200",
            "curator": {
              "days_count": 3
            }
          },
          "logstash": {
            "server_ip": "<CHANGEME>",
            "install_node_type": "compute"
          },
          "kibana": {
            "http_port": "1080",
            "https_port": "10443"
          },
          "rsyslog": {
            "port": "1514",
            "service": {
              "poll_interval": "5"
            }
          }
        }
    }
    Mandatory attributes
    • ibm-cls.logstash.server_ip: Set this to the IP address of the central logging server node in your cloud topology.
    • ibm-cls.elasticsearch.server_ip: Set this to the IP address of the central logging server node in your cloud topology.
    • ibm-cls.logstash.install_node_type: Set this to “other” if you are installing central logging server on separate node or VM. Otherwise set this to “compute” if you are installing central logging server on any compute node in your cloud topology. Default value is "other".
    Optional attributes
    • ibm-cls.log_file.poll_interval: Set this to number of seconds used as polling interval for log files on client nodes. Default value is 10 seconds.
    • ibm-cls.log_file.logrotate.file_size: Set this to the maximum size of the syslog file used to rotate the syslog file on client nodes when the size grows bigger than this attribute value. Default value is 10M bytes.
    • ibm-cls.log_file.logrotate.rotate_count: Set this to the number of times the syslog file will be rotated before being removed on the client nodes. Default value is 10.
    • ibm-cls.iptables.enabled: Set this to true if you want to enable iptables and configure iptables rules on the central logging server node. Otherwise set to false. Default value is true.
    • ibm-cls.elasticsearch.server_port: Set this to the port number to be used for the elasticsearch server on central logging server node. Default is 9200.
    • ibm-cls.elasticsearch.curator.days_count: Set this to minimum number of days for which the logs should be preserved with elastiscsearch. Logs older than the number of days specified for this attribute, are purged . Default value is 3 days.
    • ibm-cls.kibana.http_port: Set this to the port number to be used as HTTP port on the central logging server node to access Kibana over HTTP. Default is 1080.
    • ibm-cls.kibana.https_port: Set this to the port number to be used as HTTPS port on the central logging server node to access Kibana over HTTPS. Default is 10443.
    • ibm-cls.rsyslog.port: Set this to port number to be used for rsyslog on client nodes. Default is 1514.
    • ibm-cls.rsyslog.service.poll_interval: Set this to the number of minutes used as the polling interval to check the status of rsyslog service and restart if not running on client nodes. Default value is 5 minutes.
  2. Include the following roles in your topology file your-topology-name.json.
    1. Add the role "role[ibm-cls-server-node]" to the compute node details on which you want to install CLS.
      {
            "name": "kvm_compute1", #compute node 1
            "fqdn":"<compute-node1-hostname>",
            "password":"CHANGEME",
            "quit_on_error":true,
            "run_order_number":2,
            "runlist": [
              "role[ibm-os-compute-node-kvm]",
              "role[ibm-os-prs-compute-node]",
              "role[ibm-cls-server-node]"
            ]
          },
      Note: This will install CLS on this compute node.
    2. Add the role "role[ibm-cls-client-controller-node]" to your controller node details. For example:
      "nodes": [
          {
            "name": "controller",
            "fqdn":"<controller-node-hostname>",
            "password":"CHANGEME",
            "quit_on_error":true,
            "run_order_number":1,
             "runlist": [
               "role[ibm-os-single-controller-node]",
               "role[ibm-os-prs-ego-master]",
               "role[ibm-os-prs-controller-node]",
               "role[ibm-sce-node]",
               "role[ibm-cls-client-controller-node]"
            ]
      Note: This will forward the logs from the controller node to the CLS.
    3. Add the role "role[ibm-cls-client-compute-node]" to all compute nodes of which you want to collect logs from. This role will configure rsyslog on these nodes which will then send relevant logs to the CLS. For example:
      {
            "name": "kvm_compute2", #compute node 2
            "fqdn":"<compute-node1-hostname>",
            "password":"CHANGEME",
            "quit_on_error":true,
            "run_order_number":2,
            "runlist": [
              "role[ibm-os-compute-node-kvm]",
              "role[ibm-os-prs-compute-node]",
              "role[ibm-cls-client-compute-node]"
            ]
          },
      {
            "name": "kvm_compute3", # compute node3 
            "fqdn":"<compute-node2-hostname>",
            "password":"CHANGEME",
            "quit_on_error":true,
            "run_order_number":2,
            "runlist": [
              "role[ibm-os-compute-node-kvm]",
              "role[ibm-os-prs-compute-node]",
              "role[ibm-cls-client-compute-node]"
            ]
          },
      Note: This will forward logs from compute node 2 and compute node 3 to CLS.
    4. Add the role "role[ibm-cls-client-deployer-node]" to your deployer node details in order to get the logs from the deployer node on your CLS. For example:
      {
            "name": "deployer",
            "fqdn":"<deployer-node-hostname>",
            "password":"CHANGEME",
            "quit_on_error":true,
            "run_order_number":4,
            "runlist": [
              "role[ibm-cls-client-deployer-node]"
            ]
          }  
      Note: This will forward logs from the deployer node to CLS.
      Restriction:
      • The deployer node can be added only as a client when CLS is added with a new cloud deployment.
      • The deployer node cannot be added as a client when CLS is added to an existing cloud by using an update topology and update environment.
    Note:
    • Any compute node can have the role “role[ibm-cls-client-compute-node]” or “role[ibm-cls-server-node]”. The compute node should not have both CLS server and client roles at the same time. The compute node which has the role “role[ibm-cls-server-node]” will forward local OpenStack compute logs automatically using logstash. The CLS client role “role[ibm-cls-client-compute-node]” is not required to be added for this node.
    • In a cloud, only one CLS server deployment is permitted. This means, in a cloud topology file, only one node can have the role “role[ibm-cls-server-node]”.
  3. After you have made above changes to your topology file and environment file, continue to follow the relevant advanced deployment steps to deploy your cloud. For example:
  4. After you have deployed your cloud, you can launch Central Logging Server (CLS) Kibana UI by typing the URL.
    https://<cls-server-node-ip>:10443