Skip to content

xymoncgimsg

Stef Coene edited this page Feb 1, 2026 · 4 revisions

Client communication via xymoncgimsg.cgi

Traditional transport

The traditional transport is done on port 1984 without encryption.

Http / https transport

An alternative is xymoncgimsg.cgi. This can be hosted on a webserver with http / https and provides a way for clients to communicate with the xymon daemons.

Internally the transport is done on the traditional 1984 port.

The benefit is encryption if you use https. And you can specify a username/password for extra security.

Apache2 integratie

  • Enable the needed modules

    • sudo a2enmod auth_basic authn_file authz_core cgi alias
  • Add this to you apache configuration files:

    • Include /home/staf/xymon-server/server/etc/xymon-apache.conf
  • Relevant lines in /etc/apache2/sites-enabled/:

# Make /xymon-msg available as alias for the script
ScriptAlias /xymon-msg "/home/xymon/server/bin/xymoncgimsg.cgi"
<Location "/home/xymon/server/bin/xymoncgimsg.cgi">
   # Allow execution of scripts
   Options ExecCGI
   # Configure username & password
   AuthType Basic
   AuthName "Xymon Monitoring Client"
   # File for username & password
   AuthUserFile "/home/staf/xymon-server/server/etc/clienthtpasswd"
   Require valid-user
</Location>
  • Add users to /home/staf/xymon-server/server/etc/clienthtpasswd with the command htpasswd

Client changes

  • Verify or add the following variables to etc/xymonclient.cfg
XYMONMSGURL="/xymon-msg"
XYMONMSGURLPROTO="https"
XYMONMSGURLPORT="443"
  • Add the credentials added to clienthtpasswd also to etc/curl.cfg and etc/wget.cfg
    • This is default prefilled with client:client
  • IF you have a valid SSL certificate for you xymon server, you can remove insecure and check_certificate=off
  • Use xymon-curl.sh or xymon-wget.sh as dropin replacement for the xymon binary
    • The script ext/configure.sh can be used to automate this. Execute it with the correct environment: ./bin/xymoncmd ./ext/configure.sh:
      • it will search for curl or wget and test the connection
      • it will rename the xymon binary to xymon.bin
      • it will symlink xymon-curl.sh, xymon-wget.sh or xymon.bin to xymon

Clone this wiki locally