Skip to main content

Documentation Portal

Linux Deployment

TrendMiner can be installed on CentOS 7 and Red Hat Enterprise Linux 7. Other distributions based on Red Hat Enterprise Linux 7 might work but are not officially supported. During the installation and any future updates, access to the official repositories or a mirror of them is required. 

TrendMiner has no extra requirements when installing on a customer-provided CentOS 7 or Red Hat Enterprise Linux 7 system outside of the software that is available in the official operating system repositories.

Note

TrendMiner currently does not support deploying a virtual disk (.ova or .vhd) in a private cloud.

Prepare the Installation

Allocate storage

TrendMiner stores application data and logs in /mnt/data. Ensure that this directory has sufficient free disk space.

Install prerequisites for Ansible

The following actions are needed to install Ansible and be able to run the full installation procedure.

yum install centos-release-ansible-29 

Check IP address usage

Important

The TrendMiner appliance uses the following default IP addresses/ranges:

These IP addresses should not be used by other applications/servers/clients which need to connect to TrendMiner or to which TrendMiner needs to connect, e.g. IPs assigned to clients connecting to TrendMiner, an AD server configured in TrendMiner, a connector to which TrendMiner needs to connect, ... If your company is already using one or more of these IP addresses it is possible to change the IP ranges for TrendMiner. In this case please contact TrendMiner support before starting the installation.

Install TrendMiner
  1. Download the TrendMiner installation file from the TrendMiner download site. The installation file is the trendminer-<version>.tar.gz file.

  2. Copy the installation archive to the destination server.

    scp <installation file> <user>@<server>:<path> 
  3. Extract the installation archive.

    tar -xf <installation file>   
  4. Run the installation script (first it will validate if Ansible is installed) and send the output to a logfile. Choose any location to save this log file.

    ./install-trendminer.sh -s server_name | tee trendminer-installation.log 

    Important

    Important note: The ‘server_name’ has to be the FQDN excluding the protocol of the server. An example: ./install-trendminer.sh -s my_tm_url.com

  5. When ansible is not installed, choose yes to install Ansible from the official Ansible CentOS repositories. If you choose no, please be sure that it’s possible to install Ansible.

    Do you want to configure the Ansible repository for CentOS (y/n)
Post-Installation Configuration

Opening additional firewall ports

TrendMiner controls the packet filtering rules of the Linux kernel using iptables. By default, only icmp, ssh (tcp/22) and http(s) (tcp/80, tcp/443) are allowed.

Additional ports can be opened by creating a configuration file, owned by root:

/etc/ansible/facts.d/iptables.fact

This file contains JSON in the following format:

{ 
    "allow_icmp": true,
    "open_tcp": [
         5666,                    
         10050 
    ] 
} 

In this example, ports 5666 and 10050 are opened on the TrendMiner instance to allow respectively NRPE and Zabbix connectivity on the system.

Validate the JSON syntax by running:

python -m json.tool < /etc/ansible/facts.d/iptables.fact 

This will echo the configuration on success. In case of errors, it will print the location:

Expecting , delimiter: line 5 column 9 (char 65) 

To apply the new firewall configuration without downtime, execute:

cd /mnt/data/ansible-playbooks 
ansible-playbook agent/configure-tm-agent.yml -i /var/www/dsquare-appliance/hosts 

The updated configuration will be applied on subsequent reboots and preserved across future TrendMiner updates.

Monitor TrendMiner

TrendMiner collects metrics into a Prometheus instance that is running on every TrendMiner system. Prometheus metrics exporters included in TrendMiner include:

  • Node Exporter exports OS level metrics

  • Postgres Exporter exports database metrics

  • Each TrendMiner service exports JVM metrics

  • Several TrendMiner services export application specific metrics

All metrics are available for external systems through Prometheus federation. Alerts based on these metrics can then be created in an external monitoring stack.

By default the metrics are not exposed. To access them, first allow port 9100 as described in the ‘Opening Additional Firewall Ports’ section. Then scrape the /federate endpoint of the Prometheus instance.

When using a monitoring stack based on Prometheus and AlertManager, Prometheus could be configured as:

scrape_configs:   
  - job_name: federated-trendminer
     honor_labels: true 
     honor_timestamps: true 
     scrape_interval: 15s
     scrape_timeout: 10s
     metrics_path: /federate
     static_configs:
       - targets:              
           - <my-trendminer>:9100 

AlertManager can then handle alerts:

groups:
  - name: TrendMiner rules
    rules:
      - alert: instance_down_2m
        expr: up{job="federated-trendminer"} == 0
        for: 2m
        labels:
          severity: Critical
        annotations:
          description: TrendMiner DOWN for 2 minutes
          summary: TrendMiner DOWN