Submit a ticketCall us

Announcing NPM 12.2
With NPM 12.2 you can monitor your Cisco ASA firewalls, to monitor VPN tunnels for basic visibility and troubleshooting tunnels. NPM 12.2 also uses the SolarWinds Orion Installer so you can easily install and upgrade one or more Orion Platform products simultaneously.
See new features and improvements.

Home > Success Center > Server & Application Monitor (SAM) > SAM 6.4 Administrator Guide > Manage application monitor templates and component monitors > Linux system configurations for Component Monitors

Linux system configurations for Component Monitors

Updated: 3-9-2017

You need to consider and complete the following configurations for component monitor and templates to effectively monitor your Linux systems with the Orion agent for Linux. Some of this information requires reviewing configurations with your vendors documentation. You may need to work with your NOC and server management groups to complete modifications.

This information is also included with the SAM Component Monitor Types and SAM Template Reference.

Apache configurations

You should have the following packages installed:

  • Apache httpd
  • LWP::UserAgent (Perl)

To install and configure:

  1. Login to your Apache server using SSH or telnet client. Grant yourself root permissions (so root).
  2. Use the command: yum install perl-libwww-perl
  3. Locate httpd.conf: find /etc -iname httpd.conf The file is typically located in /etc/httpd/conf/httpd.conf.
  4. Locate the following section:
    #<Location /server-status>
    #    SetHandler server-status
    #    Order deny,allow
    #    Deny from all
    #    Allow from .example.com
    #</Location>
    
  5. Uncomment the code. Edit the Allow from rule substituting the IP address or hostname of your Apache server for localhost. Use localhost only if the Apache server services the loopback interface. Also make sure the ExtendedStatus is On: ExtendedStatus On
    <Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from localhost
    </Location>
    ExtendedStatus On
    
  6. Restart the Apache httpd: service httpd restart
    or
    Reload the configuration: service httpd reload

Tomcat configurations

Apache Tomcat is an open-source web server, implementing several Java EE specifications.

The following information walks through installing and configuring Tomcat servers to work with SAM component monitors. If you have Tomcat installed, you can skip to step 4 to create an account used for polling.

  1. Determine the version of Tomcat you want to install. You may have multiple versions available to install. To locate all versions, use this command:
    yum search tomcat
  2. After determining the version, you can install the tomcat package and the admin webapps package. Locate the versions to install from the search results. For example:
    tomcat5.i386 : Apache Servlet/JSP Engine, RI for Servlet 2.4/JSP 2.0 API
    tomcat5-admin-webapps.i386 : The administrative web applications for Jakarta Tomcat
  3. Install the versions using the located versions. To install the example above:
    yum install tomcat5 tomcat5-admin-webapps
  4. Next, you need to modify the tomcat-users.xml file to create and provide a user account to access the web manager ('manager','manager-gui'). To locate, use this command:
    find /etc -iname tomcat-users.xml
  5. Edit the file and locate the <tomcat-users> section. If commented out, uncomment the configuration. Edit to add a user of tomcat with the password of tomcat. The template uses this account to access data.
    <tomcat-users>
    <user name="tomcat" password="tomcat" roles="tomcat,manager,manager-gui" />
    <user name="role1"  password="tomcat" roles="role1"  />
    <user name="both"   password="tomcat" roles="tomcat,role1" />
    </tomcat-users>
  6. Restart the service. The command depends on the version you installed. For example, this command restarts the installed service above:
    service tomcat5 restart
    

JMX

For JMX configurations, you need to install and configure WebSphere per your Linux distribution. For details, see the IBM WebSphere documentation site.

The following instructions walk-through an install and configuration:

  1. Download and install WebSphere. You may require credentials for the installation on the Linux-based computer.
  2. Run the installation:

    • You can turn off the secure storage option. The setting is not required.
    • You may need to create a new package group.
    • Make sure to select the Application Server during installation.
    • You may also need to create an administrator account. Make note of the new administrator account credentials.
  3. Start and stop the WebSphere AppServer.
  4. Access the WebSphere AppServer console to continue configurations using the administrator account you created during installation.

    You can access by pointing a browser to http://<websphere-host>:9060/ibm/console.

    You may need to open a port to 9060 on the websphere host.

  5. Expose the JMX platform mbeans in the WebSphere AppServer using the console. Click Servers > Server Types > WebSphere application servers and select the listed application server.
  6. Locate the Java and Process Management > Process definition. In the dialog box titled "Generic JVM arguments" enter the following:
    Djavax.management.builder.initial=
    

    There is nothing after the = sign.

    Dcom.sun.management.jmxremote=true
    Dcom.sun.management.jmxremote.port=8686
    Dcom.sun.management.jmxremote.ssl=false
    Dcom.sun.management.jmxremote.authenticate=false
    
  7. Restart the AppServer.

Squid

Squid is a caching and forwarding web proxy. It has a wide variety of uses, from speeding up a web server by caching repeated requests; to caching web, DNS and other computer network lookups for a group of people sharing network resources, to aiding security by filtering traffic.

To configure Squid for agent polling:

  • SNMP is required - Enable the SNMP feature for Squid. If using Squid-3, this feature is available to enable by adding a configuration option to squid.conf. If using Squid-2, you will need to enable the feature using a series of scripts then configure.
  • perl-switch is required - Add per your Linux distribution vendor's documentation.

Review your vendor documentation for details at http://www.squid-cache.org/.

Nagios

Nagios monitors systems, networks, and infrastructure. It offers monitoring and alerting servers, switches, applications, and services. Refer to your vendor's documentation to properly install and configure Nagios according to your Linux distribution.

You can use the Nagios Script monitor and Linux/Unix Script monitor for monitoring Nagios.

If you are using this component monitor with Nagios and polled by Orion agent for Linux, you need to enter a script as follows. The argument would be python $(SCRIPT) with a body of:

from random import randint
STAT_PAIRS_COUNT = 10
 
for stat_id in range(STAT_PAIRS_COUNT):
	print 'Statistic.random%d: %d\nMessage.random%d: %s' % (stat_id, randint(1,100), stat_id, 'random number: ' + str(randint(1,100)))

ODBC configurations

To monitor a database with an ODBC connector, you need to install an ODBC driver for your installed database type, create a user, and test access. Use the new account credentials in your SAM template and component monitors. For a full list of available templates, see SAM Template Reference.

For the following instructions, you should have your DBMS installed such as MySQL or PostgreSQL.

The following sections provide a walk-through for configuring:

These instructions provide general ODBC configurations:

  1. (Required) To begin, you should have unixODBC installed to support Microsoft Windows ODBC. If not, download and install the unixODBC driver to the Linux-based computer.
    Command: yum install unixODBC
  2. Download and install an ODBC driver for your installed database type.
  3. Create a user account for the database.
  4. Configure the user access privileges with administrative privileges.
  5. Test access to the database using the newly created account credentials.

Configure and assign a SAM template with the credentials.

  1. On the Web Console, click Settings > All Settings > SAM Settings > Manage Templates.
  2. Search for a template based on the database type such as ODBC or Oracle. SolarWinds recommends creating a copy of the template. Select a template and click Copy.
  3. Modify the settings of the template and component monitors based on the metrics you want to monitor.
  4. To enter credentials, select the component monitor checkboxes and click Assign Credentials.
  5. Enter the credentials you created for the database and click OK.
  6. Test the access for the template by assigning it to a node. Click Test Node to assign and test the access. If you encounter issues, verify the credentials and privileges for the account.

PostgreSQL configurations

To monitor a PostgreSQL database server with component monitors, you need to install an ODBC driver, create a user, and test access. Use the new account credentials in your SAM template and component monitors.

SAM provides a PostgreSQL template and component monitors for PostgreSQL 9.

For the following instructions, you should have PostgreSQL installed on a Linux-based computer.

  1. Login to the Linux-based computer with administrator privileges.
    You will need to create a user account on the server and in the PostgreSQL database.
  2. (Required) To begin, you should have unixODBC installed to support Microsoft Windows ODBC. If not, download and install the unixODBC driver to the Linux-based computer.
    Command: yum install unixODBC
  3. Download and install the PostgreSQL ODBC driver on the target Linux-based computer.
    Command: yum install postgresql-odbc
  4. Create a user account for the database.

    The example of commands adds a user account dbuser with the password Password1 to the Linux-based computer. The next commands login as the database superuser to the ProgreSQL server and modify the created user.

    # adduser dbuser
    # passwd Password1
    # su - postgres
    $ psql -d template1 -U postgres
    

    At the prompt, create the dbuser account with the Password1 password:

    template1=# CREATE USER dbuser WITH PASSWORD 'Password1';
    

    Next, grant privileges for your PostgreSQL database (TestDatabase) to the user account:

    template1=# GRANT ALL PRIVILEGES ON DATABASE TestDatabase to dbuser;
    

    Close the template:

    template1=# \q
  5. Test access to the database using the newly created account credentials.

    $ su - dbuser
    $ psql -d TestDatabase -U dbuser

Configure and assign a SAM template with the credentials.

  1. On the Web Console, click Settings > All Settings > SAM Settings > Manage Templates.
  2. Search for the PostgreSQL template. SolarWinds recommends creating a copy of the template. Select the template and click Copy.
  3. Modify the settings of the template and component monitors based on the metrics you want to monitor.
  4. To enter credentials, select the component monitor checkboxes and click Assign Credentials.
  5. Enter the credentials you created for the database and click OK.
  6. Test the access for the template by assigning it to a node. Click Test Node to assign and test the access. If you encounter issues, verify the credentials and privileges for the account.

Troubleshooting

Error: FATAL: Peer authentication method failed for user "postgresuser"

Solution: If you receive this error, change the authentication method to md5.

MySQL configurations

To configure MySQL, you need to install and configure the appropriate MySQL repository, create a user account, and test access. Use the new account credentials in your SAM template and component monitors.

SAM templates include two options for MySQL 5.7.9 and earlier and 5.7.9 and later.

For the following instructions, you should have MySQL installed on a Linux-based computer.

Depending on your Linux distribution, verify the example commands used. These examples use CentOS commands.

  1. Login to the Linux-based computer with administrator privileges.

    You will need to create a user account on the server and in the MySQL database.

  2. (Required) To begin, you should have unixODBC installed to support Microsoft Windows ODBC. If not, download and install the unixODBC driver to the Linux-based computer.
  3. Install the MySQL ODBC driver.

    Command: yum install mysql-connector-odbc

  4. Create a user account for the database.

    The following commands create a MySQL account of dbuser with the password Password1 for the database dbtest. The commands also grant all access to the user account.

    create database testdb;
    create user 'dbuser'@'localhost' identified by 'Password1';
    grant all on dbtest.* to 'dbuser' identified by 'Password1';
  5. (Required) Grant the following access for local access to monitor through SAM and the Orion Platform.

    Enter the IP address of this MySQL Linux-based computer, replacing the example value of 10.100.100.100.

    mysql -uroot -p
    CREATE USER 'dbuser'@'%' IDENTIFIED BY 'Password1';
    GRANT ALL ON testdb.* TO dbuser@'%' IDENTIFIED BY 'Password1';
    GRANT SELECT ON performance_schema.* TO dbuser@'10.100.100.100' IDENTIFIED BY 'Password1';
  6. Test access to the database using the newly created account credentials.

    Command: mysql -u testuser -p

Configure and assign a SAM template with the credentials.

  1. On the Web Console, click Settings > All Settings > SAM Settings > Manage Templates.
  2. Search for the MySQL templates. SolarWinds recommends creating a copy of the template. Select a template based on version and click Copy.
  3. Modify the settings of the template and component monitors based on the metrics you want to monitor.
  4. To enter credentials, select the component monitor checkboxes and click Assign Credentials.
  5. Enter the credentials you created for the database and click OK.
  6. Test the access for the template by assigning it to a node. Click Test Node to assign and test the access. If you encounter issues, verify the credentials and privileges for the account.

Troubleshooting

Error: Data source name not found and no default driver specified. This error occurs on a CentOS system.

Solution: Verify the CentOS system has the mysql-connector-odbc installed. Use the following command to receive a package and version name on the target Linux-based computer: rpm -q mysql-connector-odbc

Verify you have the appropriate credentials assigned for each component monitor.

  1. On the Web Console, click Settings > All Settings > SAM Settings > Manage Templates.
  2. Search for the SAM template. Select and click Edit.
  3. Select the component monitor to check assigned credentials.
  4. To modify, click Assign Credentials, enter credentials, and click OK.
  5. Test the template.

If you continue to encounter issues, verify the appropriate driver is defined on the CentOS system to match the connection string.

For example:

cat /etc/odbcinst.ini
[MySQL]
Description=ODBC for MySQL
Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Setup=/usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
UsageCount=1
[MySQL ODBC 5.3 Unicode Driver]
Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Setup=/usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
UsageCount=1

IBM DB2 with ODBC configurations

For IBM DB2, you need to download, install, and configure DB2. For details, see the IBM DB2 documentation site.

SAM provides two IBM DB2 templates: IBM DB2 and IBM DB2 HADR Health.

For the following instructions, you should have IBM DB2 installed on a Linux-based computer. To run commands, you will need the instance users for the database. The instance user connects to the DB and should have the sqllib directory set up.

  1. Login to the Linux-based computer with administrator privileges.
    You will need to create a user account on the server and in the DB2 database.
  2. Install the unixODBC package.
    Command: yum -y install unixODBC
  3. Update the ODBC config files. Add the following settings to /etc/odbcinst.ini:
    [DB2]
    Description = DB2 Driver
    Driver = /opt/ibm/db2/V10.5/lib64/libdb2.so
    FileUsage = 1
    DontDLClose = 1

    Verify libdb2.so has the correct file path.

  4. Add the following settings to /etc/odbc.ini:
    [dbname]
    Driver = DB2

    The drivers should match in both files.

  5. Connect locally to the database with the instance user credentials. For example:
    isql -v dbname db2inst1 Password1
  6. Log into the DB2 database with the instance user credentials and open the DB2 command line tool.
  7. Enable the required following setting used by the SAM IBM DB2 template:
    UPDATE DBM CFG USING DFT_MON_BUFPOOL ON
    UPDATE DBM CFG USING DFT_MON_LOCK ON
    UPDATE DBM CFG USING DFT_MON_STMT ON
    UPDATE DBM CFG USING DFT_MON_UOW on
  8. Grant execute on function SYSPROC.MON_GET_TABLE to the instance user account.

Configure and assign the SAM IBM DB2 template to your Linux-based computer with the instance user credentials.

  1. On the Web Console, click Settings > All Settings > SAM Settings > Manage Templates.
  2. Search for a IBM DB2 template. SolarWinds recommends creating a copy of the template. Select a template based on version and click Copy.
  3. Modify the settings of the template and component monitors based on the metrics you want to monitor.
  4. To enter credentials, select the component monitor checkboxes and click Assign Credentials.
  5. Enter the credentials for the instance user account and click OK.
  6. Modify the connection strings for monitors to match your DB. Use one of the following methods:

    • Specify the actual DB and driver:
      Driver={DB2};Database=TESTDB;Hostname=${IP};Port=50000;Protocol=TCPIP;Uid=${USER};Pwd=${PASSWORD};
    • Specify the existing data source in odbc.ini:
      DSN=testdb;Uid=${USER};Pwd=${PASSWORD};
 
Last modified
10:04, 17 Mar 2017

Tags

Classifications

Public