PowerShell Module for Open Data Context API (Legacy/Standalone)
Note: This is a standalone module for interacting with the ExtraHop Open Data Context API. This module has been superseded by the ExtraHopClient for Windows PowerShell (v2.0).
Beginning with ExtraHop firmware version 4.0, ExtraHop introduced the Open Data Context API which allows customers to further enrich insights from wire data by contextualizing them with data from third-party sources. With the API, users can ingest information from a wide range of third party data sources (e.g. user IDs) into ExtraHop’s Session Table. The API is bi-directional and also allows external sources to pull information from ExtraHop’s session table.
- Currently, this client only provides access to the Open Data Context API over TCP. UDP is not supported at this time.
- The functions provided by this client are consistent with the behavior of the Session table accessor functions within Triggers. For functional details, see the functions' descriptions within the module's source code, or refer to the Session object within the ExtraHop Triggers API document. Alternatively, one can interact with the Session table using the raw Memcache operations described toward the end of this post.
Requires Windows PowerShell version 3.0 or higher.
- Download the ExtraHopODCClient.txt (23.6 KB), saving it as: ExtraHopODCClient.psm1
- Save above ExtraHopODCClient.psm1 to the following location, creating directory structure as-needed:
- Launch PowerShell, and verify installation of module by issuing the following command:
PS> Get-Module -ListAvailable
- Import module, instantiate ODC client object and invoke method calls.
Update:Prefer interacting with the Session Table using raw memcache methods
rather than the methods defined in the ExtraHop Triggers API
? Standard memcache operations "set,add,replace,get,incr,decr" are available using the 'memcache' property of the ODCClient module:
PS> $odc.memcache.set("test", "value")