-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmlagent-conf-dist.json
65 lines (57 loc) · 2.14 KB
/
xmlagent-conf-dist.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
"#": "Configuration for xmlagent.py for talking to xml_agent in a Cisco device.",
"#": "$Id: xmlagent-conf-dist.json,v 1.2 2012/02/06 20:05:58 weiwang Exp $",
"#": "Items keyed with # (hash) are comments.",
"#": "URL is built with a dict with: {host, agent}",
"url-format": "https://%(host)s/%(agent)s",
"#": "Optional credentials to use for HTTP/HTTPS basic authorization.",
"user": "<admin-userid>",
"password": "<admin-password>",
"#": "Options: variable and value pairs for HTTP posting",
"#": " Values are resolved with data from this configuration or from CLI.",
"request":
{
"xml_cmd": "<request_raw context-name=\"%(context)s\">%(command)s</request_raw>"
},
"#": "This section is mandatory for parsing result, although some elements are optional.",
"result":
{
"#": "XML tag for result coming back from request",
"tag": "xml_show_result",
"#": "Exit code : result value range",
"#": "The exit code map needs to match the <command-exit> section in a probe.",
"#": "This map is optional. If not found, the probe returns 0 for success;",
"#": " 3 for down condition (URLError); -1 for other errors.",
"map":
{
"0": [ 0, 50000 ],
"1": [ 50001, 100000 ],
"2": [ 100001, 500000 ],
"3": []
},
"#": "Optional, for producing a text output. If this section is present, then all",
"#": "3 components must also be.",
"#": " format": {reason:=\"%s\"} for Intermapper probe, %s default (for xmlget.py)",
"#": " status": Assuming error status is -1, and so on.",
"#": " delimiter: Text for delimiting multiple 'result'.",
"output":
{
"status": [ "Error", "Okay", "warning", "Alarm", "Down" ],
"format": "{$status:=\"%(status)\", $cmd:=\"%(command)\", $result:=%(result) } %s",
"delimiter": ", "
}
},
"#": "Command data components, replaced by command line arguments if specified.",
"data":
{
"agent": "bin/xml_agent",
"command": "show xlate global %(vip)s | count",
"host": "<device-DNS-name-or-IP>",
"context": "TEST-CONTEXT",
"vip": "<service-IP>"
},
"#": "The maximum number of recursions for value resolution",
"recursion": 8,
"debug": false,
"#": "End"
}