Horde - setting up MongoDB sink for Telemetry data

Hello,

I have Horde analytics setup for my project and I can see the data in the Analytics page. Now I would like Horde to write the raw Telemetry data in the bundled MongoDB instance. Based on the documentation I believe it is possible but I can’t figure out how/where to enable it in the config files.

I am using MongoDB Compass to check the content of the DB and the Telemetry document remains desperately empty (unlike the Metric document where I can see the aggregated data).

Can anyone help me with this?

Thank you,

Clement

Hello Clement,

You will want to add this to your server.json file inside the “Horde” section, adjusting RetainDays for the value you require

"Plugins": {
    "Analytics": {
        "Sinks": {
            "Mongo": {
               "Enabled": true,
               "RetainDays": 1
            }
        }
    }
}

The docs look to be out of date on how the Analytics plugin is used now. I will file a bug for that.

Matthew

Hello Matthew,

Are you referring to the server.json file located in Horde installation directory (e.g. C:\Program Files\Epic Games\Horde\Server\Defaults\server.json)? My json file looks like this and it does not seem to work. The Telemetry collection is still empty and now nothing gets added to the Metrics collection anymore.

// Changes to this file requires a restart of the server
{
	"Horde": {
 
		// How to authorize users to log in to the server. Auth is disabled by default ("Anonymous"), but can also be configured to use accounts managed 
		// by Horde itself ("Horde") or to use an external OIDC auth provider ("OpenIdConnect" or "Okta").
		"AuthMethod": "Anonymous",
 
		// Path to read the global Horde configuration from. This can be a path on disk, or path to a file in Perforce if that is configured below.
		// The specified file is continuously monitored for updates and will be hot-reloaded without restarting the Horde server
		"ConfigPath": "globals.json",
 
		// List of Perforce servers for use specifically by the server (eg. for bootstrapping configuration read from P4, rather than executing jobs).
		// Configuration for the server may be stored in a more secure location than standard agents have access to.
		"Perforce": [
//			{
//				"id": "Default",
//				"serverAndPort": "perforce:1666",
//				"credentials": {
//					"userName": "test.user",
//					"password": "password (optional)",
//					"ticket": "ticket (optional)"
//				}
//			}
		],
 
		// Configure an editor telemetry sink that stores data in the bundled MongoDB instance.
		// This stores raw telemetry data; aggregated metrics can be computed dynamically without
		// needing to scan this data, and is expired separately.
		"Telemetry": [
			{
				"Type": "Mongo",
				"RetainDays": 1
			}
		],	
 
		// Whether to use the local Perforce environment for reading configuration data
		"UseLocalPerforceEnv": false,
		
		"Plugins": {
			"Analytics": {
				"Sinks": {
					"Mongo": {
						"Enabled": true,
						"RetainDays": 1
					}
				}
			}
		}
	}
}

Just to make sure we are on the same page, I am trying to have both the aggregated and raw data pushed to MongoDB. Based on the documentation I think it is possible. The aggregated data would get pushed to the Metrics collection and the raw data to the Telemetry collection.

Thank you,

Clement

Hello Clement, I have asked a colleague for additional help as I am unsure why this change would have then turned off metric collection.

Matthew

Hey there Clement,

Thank you for your patience regarding this. So this should be configurable via the server.json configuration:

{
	"Horde": {
		//...
		"plugins": {
			"Analytics": {
				"Sinks": {
					"Mongo": {
						"Enabled": true,
						"RetainDays": 1
					},
				}
			}
		}
		//...
	}
}

This should result in you posting to the Telemetry collection in your mongodb.

Kind regards,

Julian