Documentation forServer & Application Monitor
Monitoring your applications and environment is a key capability of Hybrid Cloud Observability and is also available in a standalone module, Server & Application Monitor (SAM). Hybrid Cloud Observability and SAM are built on the self-hosted SolarWinds Platform.

Configure Linux/Unix systems for monitoring by the SolarWinds Platform agent in SAM

The SolarWinds Platform automatically configures SNMP as the polling method on Linux/Unix systems when Discovery detects new or updated nodes, unless otherwise specified in Network Discovery settings.

To monitor systems with the SolarWinds Platform agent for Linux instead of SNMP, you'll need to:

  1. Deploy agents to monitored target nodes. Watch this video for an overview.
  2. Configure target systems, as described in the following sections:

You may also need to reference vendor documentation, and work with your NOC and server management groups to complete modifications.

Apache

To prepare a system for polling by the SolarWinds Platform agent for Linux:

  1. Log in to your Apache server using SSH or telnet client. Use an account with root permissions.
  2. Confirm that the following packages are installed. Install, if necessary.
    • Apache httpd
    • LWP::UserAgent (Perl)
  3. Use the command: yum install perl-libwww-perl
  4. Locate the httpd.conf file, typically stored in /etc/httpd/conf/.
    You can use this command to find it: find /etc -iname httpd.conf
  5. Open httpd.conf and scroll to the following section:
    #<Location /server-status>
    #    SetHandler server-status
    #    Order deny,allow
    #    Deny from all
    #    Allow from .example.com
    #</Location>
    
  6. Uncomment the code, and then edit the Allow from rule to add the IP address or hostname of the target Apache server.

    Use localhost only if the Apache server services the loopback interface. Make sure the ExtendedStatus is set to On.

    <Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from localhost
    </Location>
    ExtendedStatus On
    
  7. To finish, you can take either of the following actions:
    • Restart with httpd: service httpd restart
    • Reload the configuration: service httpd reload

Tomcat

Follow these steps to install and configure Tomcat servers to work with SolarWinds Platform agents

If Tomcat is already installed, skip to step 4 to create an account for polling.

  1. Determine the version of Tomcat you want 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, run:
    yum install tomcat5 tomcat5-admin-webapps
  4. Modify the tomcat-users.xml file to create 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. Uncomment the section, if necessary, and edit it to add a user, tomcat, with a unique password that the template can use to access data.
    <tomcat-users>
    <user name="tomcat" password="password" roles="tomcat,manager,manager-gui" />
    <user name="role1"  password="password" roles="role1"  />
    <user name="both"   password="password" roles="tomcat,role1" />
    </tomcat-users>
  6. Restart the service. The command depends on the version installed. For example, this command restarts the installed service above:
    service tomcat5 restart

JMX

For JMX configurations, install and configure IBM WebSphere per your Linux/Unix distribution. See the IBM Knowledge Center (© 2019, IBM Corp., ibm.com/support) for details.

JMX monitoring is disabled if FIPS mode is enabled on the SolarWinds Platform server.

  1. Install WebSphere and note the following details:
    • You may need to create an administrator account and a new package group.
    • During installation, disable the secure storage option. It is not needed.
    • Make sure to select the Application Server during installation.
  2. Start and stop the WebSphere AppServer.
  3. Use a browser to access the WebSphere AppServer console at http://websphere-host:9060/ibm/console
    • You may need to open a port to 9060 on the Websphere host.
    • Use the credentials for the account created during installation.
  4. In the IBM console, expose the JMX platform Mbeans in the WebSphere AppServer.:
    1. Click Servers > Server Types > WebSphere application servers.
    2. Select the listed application server.
  5. Locate the Java and Process Management > Process definition. In the Generic JVM arguments dialog box, enter the following code:

    Djavax.management.builder.initial=

    Note: 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

    Djava.rmi.server.hostname=localhost

  6. Restart the AppServer.

Squid

The Squid caching and forwarding web proxy has a variety of uses, from speeding up a web server by caching repeated requests; to caching web, DNS and other 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.

For reference, see Squid documentation (available at squid-cache.org).

Nagios

Nagios monitors systems, networks, and infrastructure. 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 to poll data from Nagios systems. To support polling by the SolarWinds Platform agent for Linux, edit each monitor to add the following script. For the Script Argument, use python $(SCRIPT).

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 databases

To monitor a database with an ODBC connector, install an ODBC driver for the installed database type, create a user, and test access. Use the new account credentials in SAM application monitor templates, application monitors, and component monitors.

The following instructions assume that a database such as MySQL or PostgreSQL is installed.

  1. (Required) Verify that a unixODBC driver is installed on each system installed to support Windows ODBC. Install a driver, if necessary.
  2. Install the DBMS driver.
  3. Create a user account for the database.
  4. Configure user access privileges with administrative privileges.
  5. Test access to the database using the new account credentials.

To modify a SAM template and assign it to a node as an application monitor:

  1. Click Settings > All Settings > SAM Settings > Manage Templates.
  2. Search for a template based on the database type such as ODBC or Oracle.
  3. (Recommended) Create a copy of the template by selecting the template and clicking Copy.
  4. Modify template and component monitor settings based on the metrics you want to monitor.
  5. To add credentials:
    1. Select a component monitor, and then click Assign Credentials.
    2. Enter the credentials created for the database and click OK.
  6. Assign the template to a node, and then click Test Node to test access. If you encounter issues, verify the credentials and privileges for the account.

PostgreSQL databases

SAM includes a PostgreSQL application monitor template for PostgreSQL 9. To monitor a PostgreSQL database server with component monitors, install an ODBC driver, create a user, and test access. Use the new account credentials in SAM template and component monitors.

The following instructions assume that PostgreSQL is installed on a Linux-based computer.

  1. Log in to the system 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 following example includes commands for adding a user account, dbuserID, to the Linux-based system, and then log in to the PostgreSQL server and modify the new user.

    # adduser dbuserID
    # passwd Password
    # su - postgres
    $ psql -d template1 -U postgres

    At the prompt, create the dbuserID account with a unique password:

    template1=# CREATE USER dbuserID WITH PASSWORD 'Password';

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

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

    Close the template:

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

    $ su - dbuserID
    $ psql -d TestDatabase -U dbuserID

To configure and assign a SAM template with the credentials:

  1. 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 a component monitor, and then click Assign Credentials.
  5. Enter the credentials you created for the database and click OK.
  6. Test access to 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.

If you receive a "FATAL: Peer authentication method failed for user 'postgresuser'" message, change the authentication method to md5.

MySQL configurations

To configure MySQL, install and configure the appropriate MySQL repository, create a user account, and test access. Use the new account credentials in your MySQL templates and component monitors.

The following instructions assume that MySQL is already installed on the Linux-based system. Command examples use CentOS commands.

  1. Log in to the Linux-based system with administrator privileges.

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

  2. (Required) If a unixODBC driver is not already installed to support Microsoft Windows ODBC, download and install one now.
  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 for dbuserID for the database, dbtest with full access. Provide a unique password.

    create database testdb;
    create user 'dbuserID'@'localhost' identified by 'Password';
    grant all on dbtest.* to 'dbuserID' identified by 'Password';
  5. (Required) Grant the user privileges to monitor data.

    In the following example, 10.123.100.100 is the IP address of the MySQL Linux-based system:

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

    Command: mysql -u testuser -p

Configure and assign a SAM application monitor template with the credentials.

  1. Click Settings > All Settings > SAM Settings > Manage Templates.
  2. Search for and select the MySQL template.
  3. (Recommended) Click Copy to create a backup version of the template.
  4. Modify template settings and component monitors based on the metrics you want to monitor.
  5. To enter credentials:
    1. Select component monitors and click Assign Credentials.
    2. 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.

If you receive a "Data source name not found and no default driver specified. This error occurs on a CentOS system." message, 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. 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, as shown in this 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 from IBM (© 2019 IBM Corp., available at ibm.com). SAM provides two IBM DB2 templates:

Linux-based computers

Here are prerequisites for the following steps:

  • IBM DB2 is installed on a Linux-based computer.
  • A user account exists on the server and in the IBM DB2 database.

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. Log in to the Linux-based computer with administrator privileges.

  2. Use the following command to install the unixODBC package:

    yum -y install unixODBC

  3. Update the ODBC config files by adding 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 that 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 UserID Password
  6. Log in to the DB2 database with the user credentials for the instance, 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. Use the GRANT EXECUTE ON FUNCTION statement to grant privileges for the SYSPROC.MON_GET_TABLE function to user, where user is the username, as shown in this example:
    GRANT EXECUTE ON FUNCTION SYSPROC.MON_GET_TABLE TO user

Configure DB2 on AIX devices

Important: Do not install the 64-bit ODBC drivers; instead, use 32-bit drivers to support Python distributed on the SolarWinds Platform agent.

  • Install the IBM DB2 ODBC Driver (© 2021 IBM Corp.; www.ibm.com/support) on AIX devices. The commands use the following driver bundle:
    v11.1.1fp1_aix64_odbc_cli_32.tar.gz.
  • Install the ODBC driver manager package and dependencies from AIX Open Source Packages.
    • info-6.4-1.aix5.1.ppc.rpm
    • libiconv-1.15-1.aix5.1.ppc.rpm
    • libtool-ltdl-1.5.26-2.aix5.1.ppc.rpm
    • readline-7.0-3.aix5.1.ppc.rpm
    • libffi-3.1.1.aix5.1.ppc.rpm (not a direct dependency, but needed by the SAM monitor plugin)
  • The gunzip utility is part of the AIX 5L™ default installation.
  • Verify that the IBM rpm.rte package exists in the /usr/bin/rpm directory

Configure ODBC for AIX

  1. Log in to the AIX-based computer with administrator privileges.

  2. Install the Red Hat Package Manager (RPM) files from the AIX Open Source Package.

    Run the following command as root: rpm -ivh unixODBC-2.3.4-1.aix5.1.ppc.rpm

    To install all dependencies, run the following command that expects the dependencies are in the same directory:.
    rpm -ivh *.rpm

  3. Install the DB2 ODBC driver. The example code creates a directory odbc_cli_32 in the /opt directory.

    gunzip v11.1.1fp1_aix64_odbc_cli_32.tar.gz

    tar -x -f v11.1.1fp1_aix64_odbc_cli_32.tar -C /opt

  4. Add the following lines to /opt/freeware/etc/odbcinst.ini:
    [DB2]
    Description = DB2 Driver
    Driver = /opt/odbc_cli_32/clidriver/lib/libdb2.so
    FileUsage = 1
    DontDLClose = 1

    Verify libdb2 has the correct file path.

  5. Add the following settings to /opt/freeware/etc/odbc.ini:

    [dbname]

    Description = IBM DB2 ODBC data source

    Driver = DB2

    DMEnvAttr = SQL_ATTR_UNIXODBC_ENVATTR={/opt/odbc_cli_32/clidriver}

    • In [dbname], enter the name of the database to be monitored.
    • DMEnvAttr value depends on the installation directory for the DB2 ODBC CLI driver.
  6. Run the following command as root. It allows the unixODBC manager driver to find the DB2 ODBC file.

    ar -X32 x libdb2.a shr.o

    mv shr.o libdb2.so

  7. Verify that the SAM python plugin can connect to the DB2 database to monitor it. Save the following script as verifyodbc.py.
    The script is written for SolarWinds Platform agents in the default location /opt/SolarWinds/Agent.

    Important: If you are not using the default port, add server hostname and port number to the connection string.

    import sys

    sys.path.insert(0, "/opt/SolarWinds/Agent/bin/Plugins/SharedPythonLibs")

    import pypyodbc

    # Set Database, Uid, and Pwd to the database name, username, and user password to access said database respectively.

    # In this example, database name, username, and the user's password are TEST, UserID, and Password respectively.

    conn_str = 'Driver={DB2};Database=TEST;Uid=UserID;Pwd=Password;'

    You can also use the following script to verify that the SAM python plugin can connect to the DB2 database:

    conn = pypyodbc.connect(conn_str, ansi=True)

    conn.close()

    except Exception, ex:

    print ex

    print "Failure"

  8. Run the script using the following command:
    /opt/SolarWinds/Agent/bin/python2 verifyodbc.py
  9. (Recommended) Configure the utilities in the DB2 ODBC CLI bundle. Create the db2cli.ini configuration file in /opt/odbc_cli_32/clidriver/cfg/db2cli.ini:

    Replace TEST with your database name.


    TEST
    Database=TEST
    dbalias=TEST
    Protocol=TCPIP
    Hostname=123.0.0.1
    ServiceName=50000

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

  1. Click Settings > All Settings > SAM Settings > Manage Templates.
  2. Search for an 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 check boxes and click Assign Credentials.
  5. Enter the credentials for the instance user account and click OK.
  6. Modify 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};