-
Notifications
You must be signed in to change notification settings - Fork 0
/
icinga2.xml
175 lines (175 loc) · 7.53 KB
/
icinga2.xml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?xml version="1.0" encoding="UTF-8" standalone="no"?><invoker type="RESTful">
<name>Icinga2</name>
<description>Icinga is a monitoring system which checks the availability of your network resources, notifies users of outages, and generates performance data for reporting.</description>
<hint>This interface provides the basic_auth. Check out the documentation https://icinga.com/docs/icinga-2/latest/doc/12-icinga2-api/</hint>
<icon></icon>
<requiredData>
<item name="url" type="string" visibility="public"/>
<item name="username" type="string" visibility="public"/>
<item name="password" type="string" visibility="protected"/>
<item name="token" type="string" visibility="private">Basic {username:password}</item>
</requiredData>
<authType>basic</authType>
<operations>
<operation name="checkConnection" type="test">
<request>
<method>GET</method>
<endpoint>{url}</endpoint>
<body data="raw" format="json" type="object">
</body>
<header>
<item name="Authorization" type="string">{token}</item>
<item name="Accept" type="string">application/json</item>
</header>
</request>
<response>
<success status="200">
<body data="raw" format="json" type="object">
</body>
</success>
<fail status="401">
<body data="raw" format="json" type="object">
</body>
</fail>
</response>
</operation>
<operation name="createHost" type="">
<request>
<method>PUT</method>
<endpoint>{url}/objects/hosts</endpoint>
<body data="raw" format="json" type="object">
<field name="templates" type="array">
<field name="0" type="string">generic-host</field>
<field name="1" type=""/>
<field name="2" type=""/>
<field name="3" type=""/>
<field name="4" type=""/>
<field name="5" type=""/>
<field name="6" type=""/>
<field name="7" type=""/>
<field name="8" type=""/>
<field name="9" type=""/>
<field name="10" type=""/>
<field name="11" type=""/>
</field>
<field name="attrs" type="object">
<field name="address" type="string"/>
</field>
</body>
<header>
<item name="Authorization" type="string">{token}</item>
<item name="Accept" type="string">application/json</item>
</header>
</request>
<response>
<success status="200">
<body data="raw" format="json" type="object">
<field name="results" type="array">
<field name="code" type=""/>
<field name="status" type=""/>
</field>
</body>
</success>
<fail status="400">
<body data="raw" format="json" type="object">
</body>
</fail>
</response>
</operation>
<operation name="modifyHost" type="">
<request>
<method>POST</method>
<endpoint>{url}/objects/hosts</endpoint>
<body data="raw" format="json" type="object">
<field name="templates" type="array">
<field name="0" type="string">generic-host</field>
<field name="1" type=""/>
<field name="2" type=""/>
<field name="3" type=""/>
<field name="4" type=""/>
<field name="5" type=""/>
<field name="6" type=""/>
<field name="7" type=""/>
<field name="8" type=""/>
<field name="9" type=""/>
<field name="10" type=""/>
<field name="11" type=""/>
</field>
<field name="attrs" type="object">
<field name="address" type="string"/>
</field>
</body>
<header>
<item name="Authorization" type="string">{token}</item>
<item name="Accept" type="string">application/json</item>
</header>
</request>
<response>
<success status="200">
<body data="raw" format="json" type="object">
<field name="results" type="array">
<field name="code" type=""/>
<field name="status" type=""/>
</field>
</body>
</success>
<fail status="400">
<body data="raw" format="json" type="object">
</body>
</fail>
</response>
</operation>
<operation name="deleteHost" type="">
<request>
<method>DELETE</method>
<endpoint>{url}/objects/hosts</endpoint>
<body data="raw" format="json" type="object">
</body>
<header>
<item name="Authorization" type="string">{token}</item>
<item name="Accept" type="string">application/json</item>
</header>
</request>
<response>
<success status="200">
<body data="raw" format="json" type="object">
<field name="results" type="array">
<field name="code" type=""/>
<field name="status" type=""/>
</field>
</body>
</success>
<fail status="400">
<body data="raw" format="json" type="object">
</body>
</fail>
</response>
</operation>
<operation name="getHosts" type="">
<request>
<method>GET</method>
<endpoint>{url}/objects/hosts</endpoint>
<body data="raw" format="json" type="object">
</body>
<header>
<item name="Authorization" type="string">{token}</item>
<item name="Accept" type="string">application/json</item>
</header>
</request>
<response>
<success status="200">
<body data="raw" format="json" type="object">
<field name="results" type="array">
<field name="name" type=""/>
<field name="attrs" type=""/>
</field>
</body>
</success>
<fail status="400">
<body data="raw" format="json" type="object">
</body>
</fail>
</response>
</operation>
</operations>
</invoker>