xcal-parktronic 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -1
  3. data/lib/xcal/parktronic/routes/alarms.rb +20 -8
  4. data/lib/xcal/parktronic/routes/events.rb +33 -1
  5. data/lib/xcal/parktronic/routes/metrics.rb +18 -0
  6. data/lib/xcal/parktronic/version.rb +1 -1
  7. data/spec/lib/xcal/parktronic/routes/alarms_route_spec.rb +15 -3
  8. data/spec/lib/xcal/parktronic/routes/event_history_items_routes_spec.rb +2 -2
  9. data/spec/lib/xcal/parktronic/routes/events_route_spec.rb +9 -2
  10. data/spec/lib/xcal/parktronic/routes/metrics_routes_spec.rb +9 -0
  11. data/spec/lib/xcal/parktronic/routes/nested/events_spec.rb +13 -1
  12. data/spec/support/api_mock.rb +16 -0
  13. data/spec/support/fixtures/responses/alarm.json +5 -2
  14. data/spec/support/fixtures/responses/alarm_action.json +2 -2
  15. data/spec/support/fixtures/responses/alarm_actions.json +3 -3
  16. data/spec/support/fixtures/responses/alarm_events.json +333 -33
  17. data/spec/support/fixtures/responses/alarm_post.json +24 -4
  18. data/spec/support/fixtures/responses/alarm_tags.json +1 -1
  19. data/spec/support/fixtures/responses/alarms_page_1.json +51 -21
  20. data/spec/support/fixtures/responses/alarms_page_2.json +51 -21
  21. data/spec/support/fixtures/responses/alarms_post.json +2 -2
  22. data/spec/support/fixtures/responses/brouha_products_services.json +15 -0
  23. data/spec/support/fixtures/responses/event.json +34 -7
  24. data/spec/support/fixtures/responses/events_history_page_1.json +5 -5
  25. data/spec/support/fixtures/responses/events_history_page_2.json +5 -5
  26. data/spec/support/fixtures/responses/events_page_1.json +105 -0
  27. data/spec/support/fixtures/responses/metrics_calculate.json +13 -0
  28. data/spec/support/fixtures/responses/stack_changes_page_1.json +20 -10
  29. data/spec/support/fixtures/responses/stack_changes_page_2.json +20 -10
  30. data/xcal-parktronic.gemspec +0 -1
  31. metadata +9 -5
  32. data/spec/support/fixtures/responses/events.json +0 -42
@@ -1,12 +1,32 @@
1
1
  {
2
- "message":"Metric created",
3
- "metric":{
2
+ "message":"Alarm updated",
3
+ "alarm":{
4
4
  "id":1924,
5
5
  "name":"custom_metric",
6
6
  "description":null,
7
7
  "metric_type":null,
8
8
  "created_at":"2013-12-14T12:55:19.000Z",
9
9
  "updated_at":"2013-12-14T12:55:19.000Z",
10
- "is_data_center_state":false
10
+ "is_data_center_state":false,
11
+ "impact_level": "Unknown",
12
+ "confidence_factor": null,
13
+ "alarm_type": null,
14
+ "originating_system": "System",
15
+ "component": null,
16
+ "primary_owner": null,
17
+ "secondary_owner": null,
18
+ "impacted_business_process": null,
19
+ "sop": null,
20
+ "is_active": true,
21
+ "upper_threshold": null,
22
+ "lower_threshold": null,
23
+ "added_at": "2015-06-04T07:34:26.829Z",
24
+ "last_reviewed_at": null,
25
+ "application_name": null,
26
+ "itrc_application_id": null,
27
+ "service_desk": null,
28
+ "latest_event_status": null,
29
+ "tenant_id": 0,
30
+ "events": []
11
31
  }
12
- }
32
+ }
@@ -1 +1 @@
1
- [{"id":1, "name": "alarm tag 1"}, {"id":2, "name": "alarm tag 2"}]
1
+ [{"id":1, "name": "alarm tag 1", "taggings_count": null}, {"id":2, "name": "alarm tag 2", "taggings_count": null}]
@@ -15,11 +15,14 @@
15
15
  "last_reviewed_at":null,
16
16
  "lower_threshold":null,
17
17
  "name":"ALARM NAME 1",
18
- "originating_system":"Source System",
18
+ "originating_system":"System",
19
19
  "primary_owner":null,
20
20
  "secondary_owner":null,
21
21
  "sop":null,
22
- "upper_threshold":null
22
+ "upper_threshold":null,
23
+ "application_name": null,
24
+ "itrc_application_id": null,
25
+ "service_desk": "Service desk"
23
26
  }
24
27
  },
25
28
  {
@@ -36,11 +39,14 @@
36
39
  "last_reviewed_at":null,
37
40
  "lower_threshold":null,
38
41
  "name":"ALARM NAME 2",
39
- "originating_system":"Source System",
42
+ "originating_system":"System",
40
43
  "primary_owner":null,
41
44
  "secondary_owner":null,
42
45
  "sop":null,
43
- "upper_threshold":null
46
+ "upper_threshold":null,
47
+ "application_name": null,
48
+ "itrc_application_id": null,
49
+ "service_desk": "Service desk"
44
50
  }
45
51
  },
46
52
  {
@@ -57,11 +63,14 @@
57
63
  "last_reviewed_at":null,
58
64
  "lower_threshold":null,
59
65
  "name":"ALARM NAME 3",
60
- "originating_system":"Source System",
66
+ "originating_system":"System",
61
67
  "primary_owner":null,
62
68
  "secondary_owner":null,
63
69
  "sop":null,
64
- "upper_threshold":null
70
+ "upper_threshold":null,
71
+ "application_name": null,
72
+ "itrc_application_id": null,
73
+ "service_desk": "Service desk"
65
74
  }
66
75
  },
67
76
  {
@@ -78,11 +87,14 @@
78
87
  "last_reviewed_at":null,
79
88
  "lower_threshold":null,
80
89
  "name":"ALARM NAME 4",
81
- "originating_system":"Source System",
90
+ "originating_system":"System",
82
91
  "primary_owner":null,
83
92
  "secondary_owner":null,
84
93
  "sop":null,
85
- "upper_threshold":null
94
+ "upper_threshold":null,
95
+ "application_name": null,
96
+ "itrc_application_id": null,
97
+ "service_desk": "Service desk"
86
98
  }
87
99
  },
88
100
  {
@@ -99,11 +111,14 @@
99
111
  "last_reviewed_at":null,
100
112
  "lower_threshold":null,
101
113
  "name":"ALARM NAME 5",
102
- "originating_system":"Source System",
114
+ "originating_system":"System",
103
115
  "primary_owner":null,
104
116
  "secondary_owner":null,
105
117
  "sop":null,
106
- "upper_threshold":null
118
+ "upper_threshold":null,
119
+ "application_name": null,
120
+ "itrc_application_id": null,
121
+ "service_desk": "Service desk"
107
122
  }
108
123
  },
109
124
  {
@@ -120,11 +135,14 @@
120
135
  "last_reviewed_at":null,
121
136
  "lower_threshold":null,
122
137
  "name":"ALARM NAME 6",
123
- "originating_system":"Source System",
138
+ "originating_system":"System",
124
139
  "primary_owner":null,
125
140
  "secondary_owner":null,
126
141
  "sop":null,
127
- "upper_threshold":null
142
+ "upper_threshold":null,
143
+ "application_name": null,
144
+ "itrc_application_id": null,
145
+ "service_desk": "Service desk"
128
146
  }
129
147
  },
130
148
  {
@@ -141,11 +159,14 @@
141
159
  "last_reviewed_at":null,
142
160
  "lower_threshold":null,
143
161
  "name":"ALARM NAME 7",
144
- "originating_system":"Source System",
162
+ "originating_system":"System",
145
163
  "primary_owner":null,
146
164
  "secondary_owner":null,
147
165
  "sop":null,
148
- "upper_threshold":null
166
+ "upper_threshold":null,
167
+ "application_name": null,
168
+ "itrc_application_id": null,
169
+ "service_desk": "Service desk"
149
170
  }
150
171
  },
151
172
  {
@@ -162,11 +183,14 @@
162
183
  "last_reviewed_at":null,
163
184
  "lower_threshold":null,
164
185
  "name":"ALARM NAME 8",
165
- "originating_system":"Source System",
186
+ "originating_system":"System",
166
187
  "primary_owner":null,
167
188
  "secondary_owner":null,
168
189
  "sop":null,
169
- "upper_threshold":null
190
+ "upper_threshold":null,
191
+ "application_name": null,
192
+ "itrc_application_id": null,
193
+ "service_desk": "Service desk"
170
194
  }
171
195
  },
172
196
  {
@@ -183,11 +207,14 @@
183
207
  "last_reviewed_at":null,
184
208
  "lower_threshold":"",
185
209
  "name":"ALARM NAME 9",
186
- "originating_system":"Source System",
210
+ "originating_system":"System",
187
211
  "primary_owner":"Primary Owner",
188
212
  "secondary_owner":"Owner",
189
213
  "sop":"",
190
- "upper_threshold":""
214
+ "upper_threshold":"",
215
+ "application_name": null,
216
+ "itrc_application_id": null,
217
+ "service_desk": "Service desk"
191
218
  }
192
219
  },
193
220
  {
@@ -204,11 +231,14 @@
204
231
  "last_reviewed_at":null,
205
232
  "lower_threshold":null,
206
233
  "name":"ALARM NAME 10",
207
- "originating_system":"Source System",
234
+ "originating_system":"System",
208
235
  "primary_owner":null,
209
236
  "secondary_owner":null,
210
237
  "sop":null,
211
- "upper_threshold":null
238
+ "upper_threshold":null,
239
+ "application_name": null,
240
+ "itrc_application_id": null,
241
+ "service_desk": "Service desk"
212
242
  }
213
243
  }
214
244
  ],
@@ -217,4 +247,4 @@
217
247
  "total_count":20,
218
248
  "total_pages":2
219
249
  }
220
- ]
250
+ ]
@@ -15,11 +15,14 @@
15
15
  "last_reviewed_at":null,
16
16
  "lower_threshold":null,
17
17
  "name":"ALARM NAME 11",
18
- "originating_system":"Source System",
18
+ "originating_system":"System",
19
19
  "primary_owner":null,
20
20
  "secondary_owner":null,
21
21
  "sop":null,
22
- "upper_threshold":null
22
+ "upper_threshold":null,
23
+ "application_name": null,
24
+ "itrc_application_id": null,
25
+ "service_desk": "Service Desk"
23
26
  }
24
27
  },
25
28
  {
@@ -36,11 +39,14 @@
36
39
  "last_reviewed_at":null,
37
40
  "lower_threshold":null,
38
41
  "name":"ALARM NAME 12",
39
- "originating_system":"Source System",
42
+ "originating_system":"System",
40
43
  "primary_owner":null,
41
44
  "secondary_owner":null,
42
45
  "sop":null,
43
- "upper_threshold":null
46
+ "upper_threshold":null,
47
+ "application_name": null,
48
+ "itrc_application_id": null,
49
+ "service_desk": "Service Desk"
44
50
  }
45
51
  },
46
52
  {
@@ -57,11 +63,14 @@
57
63
  "last_reviewed_at":null,
58
64
  "lower_threshold":null,
59
65
  "name":"ALARM NAME 13",
60
- "originating_system":"Source System",
66
+ "originating_system":"System",
61
67
  "primary_owner":null,
62
68
  "secondary_owner":null,
63
69
  "sop":null,
64
- "upper_threshold":null
70
+ "upper_threshold":null,
71
+ "application_name": null,
72
+ "itrc_application_id": null,
73
+ "service_desk": "Service Desk"
65
74
  }
66
75
  },
67
76
  {
@@ -78,11 +87,14 @@
78
87
  "last_reviewed_at":null,
79
88
  "lower_threshold":null,
80
89
  "name":"ALARM NAME 14",
81
- "originating_system":"Source System",
90
+ "originating_system":"System",
82
91
  "primary_owner":null,
83
92
  "secondary_owner":null,
84
93
  "sop":null,
85
- "upper_threshold":null
94
+ "upper_threshold":null,
95
+ "application_name": null,
96
+ "itrc_application_id": null,
97
+ "service_desk": "Service Desk"
86
98
  }
87
99
  },
88
100
  {
@@ -99,11 +111,14 @@
99
111
  "last_reviewed_at":null,
100
112
  "lower_threshold":null,
101
113
  "name":"ALARM NAME 15",
102
- "originating_system":"Source System",
114
+ "originating_system":"System",
103
115
  "primary_owner":null,
104
116
  "secondary_owner":null,
105
117
  "sop":null,
106
- "upper_threshold":null
118
+ "upper_threshold":null,
119
+ "application_name": null,
120
+ "itrc_application_id": null,
121
+ "service_desk": "Service Desk"
107
122
  }
108
123
  },
109
124
  {
@@ -120,11 +135,14 @@
120
135
  "last_reviewed_at":null,
121
136
  "lower_threshold":null,
122
137
  "name":"ALARM NAME 16",
123
- "originating_system":"Source System",
138
+ "originating_system":"System",
124
139
  "primary_owner":null,
125
140
  "secondary_owner":null,
126
141
  "sop":null,
127
- "upper_threshold":null
142
+ "upper_threshold":null,
143
+ "application_name": null,
144
+ "itrc_application_id": null,
145
+ "service_desk": "Service Desk"
128
146
  }
129
147
  },
130
148
  {
@@ -141,11 +159,14 @@
141
159
  "last_reviewed_at":null,
142
160
  "lower_threshold":null,
143
161
  "name":"ALARM NAME 17",
144
- "originating_system":"Source System",
162
+ "originating_system":"System",
145
163
  "primary_owner":null,
146
164
  "secondary_owner":null,
147
165
  "sop":null,
148
- "upper_threshold":null
166
+ "upper_threshold":null,
167
+ "application_name": null,
168
+ "itrc_application_id": null,
169
+ "service_desk": "Service Desk"
149
170
  }
150
171
  },
151
172
  {
@@ -162,11 +183,14 @@
162
183
  "last_reviewed_at":null,
163
184
  "lower_threshold":null,
164
185
  "name":"ALARM NAME 18",
165
- "originating_system":"Source System",
186
+ "originating_system":"System",
166
187
  "primary_owner":null,
167
188
  "secondary_owner":null,
168
189
  "sop":null,
169
- "upper_threshold":null
190
+ "upper_threshold":null,
191
+ "application_name": null,
192
+ "itrc_application_id": null,
193
+ "service_desk": "Service Desk"
170
194
  }
171
195
  },
172
196
  {
@@ -183,11 +207,14 @@
183
207
  "last_reviewed_at":null,
184
208
  "lower_threshold":"",
185
209
  "name":"ALARM NAME 19",
186
- "originating_system":"Source System",
210
+ "originating_system":"System",
187
211
  "primary_owner":"Primary Owner",
188
212
  "secondary_owner":"Owner",
189
213
  "sop":"",
190
- "upper_threshold":""
214
+ "upper_threshold":"",
215
+ "application_name": null,
216
+ "itrc_application_id": null,
217
+ "service_desk": "Service Desk"
191
218
  }
192
219
  },
193
220
  {
@@ -204,11 +231,14 @@
204
231
  "last_reviewed_at":null,
205
232
  "lower_threshold":null,
206
233
  "name":"ALARM NAME 20",
207
- "originating_system":"Source System",
234
+ "originating_system":"System",
208
235
  "primary_owner":null,
209
236
  "secondary_owner":null,
210
237
  "sop":null,
211
- "upper_threshold":null
238
+ "upper_threshold":null,
239
+ "application_name": null,
240
+ "itrc_application_id": null,
241
+ "service_desk": "Service Desk"
212
242
  }
213
243
  }
214
244
  ],
@@ -217,4 +247,4 @@
217
247
  "total_count":20,
218
248
  "total_pages":2
219
249
  }
220
- ]
250
+ ]
@@ -4,7 +4,7 @@
4
4
  "id":23,
5
5
  "name":"Alarm Name",
6
6
  "alarm_type":null,
7
- "originating_system":"SourceSystem",
7
+ "originating_system":"System",
8
8
  "component":null,
9
9
  "primary_owner":null,
10
10
  "secondary_owner":null,
@@ -24,4 +24,4 @@
24
24
 
25
25
  ]
26
26
  }
27
- }
27
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "AAA": [
3
+ "ChangeLog"
4
+ ],
5
+ "ACNS-CDN": [
6
+ "CDN-Origin",
7
+ "CDN-Content Delivery Network"
8
+ ],
9
+ "Activation": [
10
+ "Walled Garden"
11
+ ],
12
+ "ADDS": [
13
+ "ADDS - Core"
14
+ ]
15
+ }
@@ -1,22 +1,49 @@
1
1
  {
2
2
  "event":
3
- {"id": 1,
3
+ {"id": 1,
4
4
  "alarm_id": 2,
5
5
  "event_hash": "c2f3721645d8a12fb501a07b5f51248851c55fe2",
6
- "subject": "CRITICAL Redis Hitrate alert",
7
- "description": "CRITICAL: hitrate is 0 80 - REDIS 2.6.14 on 172.24.141.113:6379 has 1 databases (db0) with 276 keys, up 1 minutes 32 seconds - hitrate is 0.00%",
6
+ "subject": "Subject name",
7
+ "description": "description text",
8
8
  "aggregated_count": 2,
9
9
  "host_impacted": "oiv-br-001",
10
10
  "service_impacted": "Redis Hitrate",
11
11
  "threshold_value": null,
12
- "jira_incident_id":" IFS-45469",
12
+ "jira_incident_id":" ID_123",
13
13
  "jira_incident_status": null,
14
- "incident_status": "CRITICAL",
14
+ "incident_status": "Status",
15
15
  "brouha_incident_id": null,
16
16
  "brouha_incident_status": null,
17
17
  "initiated_at": "2014-01-21T13:24:18.000Z",
18
18
  "created_at": "2014-01-21T12:24:19.000Z",
19
19
  "updated_at": "2014-01-21T13:24:19.000Z",
20
- "jira_browse_issue_path": "https://www.teamccp.com/jira/browse/IFS-45469"
20
+ "jira_browse_issue_path": "https://www.jira_project.com/jira",
21
+ "additional_description": null,
22
+ "event_status": "OK",
23
+ "brouha_browse_issue_path": null,
24
+ "service_now_browse_issue_path": null,
25
+ "first_event_initiated_at": "2015-04-02T15:35:01.000Z",
26
+ "acknowledged_by": null,
27
+ "acknowledged_at": null,
28
+ "snoozed_by": null,
29
+ "snoozed_for": null,
30
+ "snoozed_at": null,
31
+ "snoozed_comment": null,
32
+ "application_name": "APP_NAME",
33
+ "itrc_application_id": 12345,
34
+ "service_desk": "Service Desk name",
35
+ "incident_ticket_id": null,
36
+ "incident_ticket_sor": null,
37
+ "ticketed_by": null,
38
+ "ticketed_at": null,
39
+ "received_by_oiv_at": "2015-04-02T15:48:59.276Z",
40
+ "acknowledged_by_user": null,
41
+ "snoozed_by_user": null,
42
+ "ticketed_by_user": null,
43
+ "sub_type": null,
44
+ "host_ip_address": null,
45
+ "incident_ticket_auto_correlated": false,
46
+ "incident_ticket_auto_correlated_at": null,
47
+ "snoozed": false
21
48
  }
22
- }
49
+ }