Wolfpack 2.4 Mac addresses

Aug 19, 2014 at 7:10 PM
I'm currently using Wolfpack 2.4 and would like to make a change so every record has a column containing the MAC address of the agent sending the message. This is mainly needed as the machine host name is not a unique identifier in our environment and manually maintaining config files has proven to be error prone. It looks like I will need to make a change to the Wolfpack core to accomplish this. Would this be okay if I published a nuget package with this change? Or do you have a different way of making changes?

Thank you!
Aug 19, 2014 at 10:32 PM
Hi Frank,

It may be possible to swap the Agent Configuration plugin type defined in the role.castle.config file for a custom one that automatically sets the agent Id to the MAC address (or whatever format works best) - that is my first thought. I'll validate this tomorrow morning and see if it will work.

I'll also make sure that v3 has to ability to swap out AgentConfiguration for a custom implementation if it's not supported.

Worst case is grab 2.4 source and tweak AgentConfiguration directly. I'll update on whether a custom AgentConfig is possible though as it would be a neat solution.

Aug 20, 2014 at 11:05 AM
Ok, a small test shows it's not possible to register a different implementation of the AgentConfiguration (I created a new class that inherited from the existing AgentConfiguration).

However it should be possible to use a startup plugin to do what you need in the same way the StaticGeoLocator plugin does to set the geo lat/long properties of the AgentConfiguration.

So - create a new IStartupPlugin in a new dll and drop it into the Wolfpack folder (it will be auto discovered and executed when Wolfpack starts). In the constructor it should take the AgentConfiguration parameter (AgentConfiguration is a singleton) - then set the AgentId to the MAC address/whatever identifier you want and that should be it!

Aug 22, 2014 at 11:49 AM
Thank you. I will give it a try. I'm glad to hear you are going to provide the functionality in v3.
Oct 7, 2014 at 9:50 PM

I wanted to let you know that your suggestion to create a new IStartupPlugin worked. Thank you very much for your help.