You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
conststringSPLUNK_FULL_ENDPOINT="http://localhost:8088/services/collector";// Full splunk url
11
+
conststringSPLUNK_ENDPOINT="http://localhost:8088";// Your splunk url
12
+
conststringSPLUNK_HEC_TOKEN="1AFAC088-BFC6-447F-A358-671FA7465342";// Your HEC token. See http://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector
/// A Class for storing CustomField. They are sort of key,value pair. In simpler form key as string and value as single string, but could also be key and list of strings.
10
+
/// </summary>
11
+
publicclassCustomField
12
+
{/// <summary>
13
+
/// the fieldsname eg: role, version,
14
+
/// </summary>
15
+
publicstringName{get;set;}
16
+
/// <summary>
17
+
/// All values even simple string are stored as a list
18
+
/// </summary>
19
+
publicList<string>ValueList{get;set;}
20
+
/// <summary>
21
+
/// constructor for a simple fieldname and a value both are strings
22
+
/// </summary>
23
+
/// <param name="name">Name of filed to be indexed by Splunk. Eg Role,Version,Channel</param>
24
+
/// <param name="value">Value of keypair. Eg. Test,1.08, RestService</param>
25
+
publicCustomField(stringname,stringvalue)
26
+
{
27
+
Name=name;
28
+
ValueList=newList<string>{value};
29
+
}
30
+
/// <summary>
31
+
/// Constructor for Name and array of values
32
+
/// </summary>
33
+
/// <param name="name">Name of field eg TypeOfResource</param>
34
+
/// <param name="value">Array of values that should be connected with field.Eg Backend,Service,Rest</param>
0 commit comments