Skip to main content
Skip table of contents

Configure central logging with Nagioslog

The configuration of 3rd party software i.e. Operating Systems, Databases, Application Server, etc., in the context of this documentation is for illustration purposes only. iGrafx doesn't imply that the provided examples are the best or only way of configuration for the described scenario. Nor can we guarantee that it is the best option for performance and security. You apply the instructions at your own risk, please consult an expert of the 3rd party software if you are not sure.

If you host multiple iGrafx Platform Application Servers it may be helpful to use a federated logging system to have all nodes log into a consolidated view. While there are countless ways to approach this the following notes could be helpful for you if you happen to use Nagios Log Server or a similar tool.  We can't provide a full set of instructions or support around the configuration of such a system.

Please disregard this article if you don't have experience with a central logging system.

iGrafx Platform log4j2.xml configuration

  1. Change the log4j2.xml configuration in a text editor. This file is located in the base directory.


  2. Change the body to the following, you may need to adjust if yo you have additional logging requirements, also make sure to replace the target host address:

    <?xml version="1.0" encoding="UTF-8"?>
    		<Socket name="socket" protocol="TCP" host="YourNagiosLogServerHost" port="2058" reconnectionDelay="5000">
    		<Root level="INFO">
    			<AppenderRef ref="socket"/>
  3. The JSON based logging cannot be enabled from within the iGrafx Platform user interface. You have to add it in the JAVA_OPTS of your application server. The exact steps depend on the application server type you are using. For a Windows based system those parameters are located in the service configuration in the Java options section.

  4. Add the property

    JAVA_OPTS="$JAVA_OPTS -Dcom.igrafx.shared.utilities.log4j.JSONEventLayoutV1.UserFields=logsource:iGrafxServerName,logtype:iGrafxPlatform"
  5. Make sure the Log Server is accepting incoming traffic as described below.

  6. Restart the iGrafx Platform service.

Log Server configuration

  1. In the Nagios Log server go to the Administration > Global Configuration section.
  2. Add an Input element for the iGrafx JSON log information.
    1. The configuration should contain:

      tcp {
         codec => json
         port => 2058
    2. It will look like this when you are done:

    3. You can use UDP instead of TCP. Make sure to adjust the configuration on the iGrafx Platform node as well as the Nagios Log Server. This could provide better performance in some environments, however it can also cause problems. We had problem reports mentioning UDP buffer size overflows which can be hard to track down and depend heavily on your environment, TCP is more robust in this regards. A UDP based Input configuration will look like:

      udp {
         codec => json
         port => 2058
         buffer_size => 32768
  3. Make sure the machine's firewall allows incoming traffic for the port specified above.

This article contains

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.