Skip to content

Geneos Xtender extends the capabilities of Geneos by utilizing the large ecosystem of Nagios compatible plugins.

License

Notifications You must be signed in to change notification settings

ITRS-Group/geneos-xtender

Repository files navigation

Geneos Xtender

active console, metrics dataview

Important

Geneos Xtender is a pre-release preview of functionality that may or may not be included in a future release of Geneos and is provided without official support but on a best-effort basis.

Introduction

Geneos Xtender extends the capabilities of Geneos by utilizing the large ecosystem of Nagios compatible plugins.

xtender

The xtender cli tool runs one or more Nagios compatible checks and formats the output to be suitable for consumption by the Geneos Toolkit Plugin.

Xtender Templates

Create individual Xtender Templates for each type of device you want to check. Treat them like Opsview Host Templates. Make them small and combine them in a single xtender call when needed. Host specific details should then be passed to xtender using variables. Use Geneos variables and map them to the environment variables on the sampler. Note that all variables need to be set up using the String type.

The use of $VARIABLES$ is encouraged for maximum re-usability. A single Xtender Template, like the example below, can be used for any number of entities through a shared sampler.

Each command should be a single line using the | character to denote a scalar block string.

Example Xtender Template for a simple SNMP capable device:

- name: lan connectivity
  command: |
    $PLUGIN_DIR$/check_icmp -H $HOSTADDRESS$ -w 100.0,20% -c 500.0,60%
- name: interface status
  command: |
    $PLUGIN_DIR$/check_snmp_interfaces -H $HOSTADDRESS$ -C $SNMP_COMMUNITY$ -v 2c
- name: snmp cpu usage
  command: |
    $PLUGIN_DIR$/check_snmp_loadavg -w 5 -c 8 -H $HOSTADDRESS$ -C $SNMP_COMMUNITY$ -v 2c
- name: snmp current users
  command: |
    $PLUGIN_DIR$/check_snmp_nousers -w 75 -c 90 -H $HOSTADDRESS$ -C $SNMP_COMMUNITY$ -v 2c
- name: snmp fs usage
  command: |
    $PLUGIN_DIR$/check_snmp_fsutil args: -w 85 -c 90 -m -H $HOSTADDRESS$ -C $SNMP_COMMUNITY$ -v 2c
- name: snmp interface status
  command: |
    $PLUGIN_DIR$/check_snmp_ifstatus -i eth0 -H $HOSTADDRESS$ -C $SNMP_COMMUNITY$ -v 2c
- name: snmp memory usage
  command: |
    $PLUGIN_DIR$/check_snmp_memutil -w 75 -c 85 -x 50 -d 75 -H $HOSTADDRESS$ -C $SNMP_COMMUNITY$ -v 2c
- name: snmp system info
  command: |
    $PLUGIN_DIR$/check_snmp_sysinfo -H $HOSTADDRESS$ -C $SNMP_COMMUNITY$ -v 2c
- name: snmp tcp connections
  command: |
    $PLUGIN_DIR$/check_snmp_tcpcurrestab -w 75 -c 90 -H $HOSTADDRESS$ -C $SNMP_COMMUNITY$ -v 2c
- name: snmp uptime
  command: |
    $PLUGIN_DIR$/check_snmp_uptime -H $HOSTADDRESS$ -C $SNMP_COMMUNITY$ -v 2c

Point your Toolkit Plugin sampler to the xtender binary followed by -- and the path to one or more Xtender Templates. The checks will be run asynchronously, so the only real limiting factor is the I/O of the individual checks.

Your own Xtender Templates should be put in /opt/itrs/xtender/templates/custom/ where they can then be found by name. /opt/itrs/xtender/templates/ is reserved for standard templates that may be included in future releases.

Ranges

There is a basic support for ranges inside the Xtender Templates. They will be expanded at run time for every step in each range. The format is !!range-name:start_inclusive..end_inclusive!!; example: !!A:1..4!!. This is useful when you want a check to run several times, for example to check different interfaces on the same host, or even different interfaces on different hosts. The example below will check interfaces 1-10 on hosts 192.168.1.1-5:

- name: 192.168.1.!!A:1..5!! Interface !!B:1..10!! Traffic
  command: |
    /opt/opsview/monitoringscripts/plugins/check_snmpif traffic -v 2c -C $SNMP_COMMUNITY$ -i !!B:1..10!! -H 192.168.1.!!A:1..5!! --warn-in 1m --warn-out 20m --crit-in 2m --crit-out 35m -b 100m
  timeout: 2

The range-name can only be A or B. Note that ranges will be populated in order sorted by the name and not the order in which they occur. Only 2 ranges are allowed, but they can be repeated multiple times. The same ranges must be present both in the name and the command. Ranges with any other names will not be processed.

Conversion of Opspack configuration JSON to compatible Xtender Template YAML

The option -o can be used to convert an Opsview Opspack JSON file and print the output to stdout.

Xtender Netprobes

An Xtender Netprobe is a Docker container running a Netprobe, has the xtender CLI tool installed, as well as a large collection of templates and plugins (118 templates the last time I checked). You can use this to connect to managed entities using the provided, third party, or custom plugins. An Xtender Netprobe is typically installed within the environment that it's tasked to monitor to reduce latency and allow connections within closed networks.

Compatible distributions

Geneos Xtender is currently tested against the following distributions using the provided deb file (amd64 only):

  • Ubuntu 20.04

The standalone binary is statically compiled using MUSL and should work on any modern x86_64 Linux distribution.

Usage

The recommended approach is to deploy Geneos Xtender as an Xtender Netprobe using Docker. This will include a whole suite of templates based on the available Opsview Opspacks.

Standard Docker container

The docker image is available from the private Docker repository docker.itrsgroup.com which requires an active subscription. To log in, use:

$ docker login docker.itrsgroup.com

You can then pull the image, optionally using any of the available tags:

$ docker pull docker.itrsgroup.com/geneos-xtender-netprobe

You will need to expose (at least) port 7036 of the container to the Gateway.

$ docker run -it -d --platform=linux/amd64 --name xtender-netprobe \ 
  -p 7036:7036 docker.itrsgroup.com/geneos-xtender-netprobe

Docker Compose service using SystemD (recommended)

See the separate documentation page describing this procedure.

Stand-alone DEB file

For a stand-alone installation, download the DEB from the latest release page and install accordingly.

License

The whole Geneos Xtender project is released under the Apache-2.0 license.

   Copyright 2023-2024 ITRS Group

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Legal Disclaimer

Please note that this product is not endorsed by Nagios and was created by the ITRS Group.