Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
feat(api): Add missing information to host and service endpoints (#8500)
Browse files Browse the repository at this point in the history
* feat(api): add new APIs for resource host\service details

Resolve MON-5071

* fix(style): improve code style

Resolve MON-5071

* fix(api): show the parent downtimes and acknowledgement in Resource details endpoints

Resolve MON-5071
  • Loading branch information
vhr authored Apr 1, 2020
1 parent af47cac commit 9997cf6
Show file tree
Hide file tree
Showing 17 changed files with 780 additions and 94 deletions.
53 changes: 52 additions & 1 deletion config/packages/serializer/Centreon/Monitoring.Host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,234 +6,285 @@ Centreon\Domain\Monitoring\Host:
- 'host_min'
- 'host_main'
- 'host_full'
- 'resource_details_host'
pollerId:
type: int
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
name:
type: string
groups:
- 'host_min'
- 'host_main'
- 'host_full'
- 'resource_details_host'
acknowledged:
type: bool
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
activeChecks:
type: bool
groups:
- 'host_full'
- 'resource_details_host'
addressIp:
type: string
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
alias:
type: string
groups:
- 'host_min'
- 'host_main'
- 'host_full'
- 'resource_details_host'
checkAttempt:
type: int
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
checkCommand:
type: string
groups:
- 'host_full'
- 'resource_details_host'
checkInterval:
type: double
groups:
- 'host_full'
- 'resource_details_host'
checkPeriod:
type: string
groups:
- 'host_full'
- 'resource_details_host'
checkType:
type: int
groups:
- 'host_full'
- 'resource_details_host'
checked:
type: bool
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
displayName:
type: string
groups:
- 'host_min'
- 'host_main'
- 'host_full'
- 'resource_details_host'
executionTime:
type: double
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
iconImage:
type: string
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
iconImageAlt:
type: string
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
lastCheck:
type: DateTime
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
lastHardState:
type: int
groups:
- 'host_full'
- 'resource_details_host'
lastHardStateChange:
type: DateTime
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
lastNotification:
type: DateTime
groups:
- 'host_full'
- 'resource_details_host'
lastStateChange:
type: DateTime
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
lastTimeDown:
type: DateTime
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
lastTimeUnreachable:
type: DateTime
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
lastTimeUp:
type: DateTime
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
lastUpdate:
type: DateTime
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
latency:
type: double
groups:
- 'host_full'
- 'resource_details_host'
maxCheckAttempts:
type: int
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
nextCheck:
type: DateTime
groups:
- 'host_full'
- 'resource_details_host'
nextHostNotification:
type: int
groups:
- 'host_full'
- 'resource_details_host'
notificationInterval:
type: double
groups:
- 'host_full'
- 'resource_details_host'
notificationNumber:
type: int
groups:
- 'host_full'
- 'resource_details_host'
notificationPeriod:
type: string
groups:
- 'host_full'
- 'resource_details_host'
notify:
type: bool
groups:
- 'host_full'
- 'resource_details_host'
notifyOnDown:
type: bool
groups:
- 'host_full'
- 'resource_details_host'
notifyOnDowntime:
type: bool
groups:
- 'host_full'
- 'resource_details_host'
notifyOnFlapping:
type: bool
groups:
- 'host_full'
- 'resource_details_host'
notifyOnRecovery:
type: bool
groups:
- 'host_full'
- 'resource_details_host'
notifyOnUnreachable:
type: bool
groups:
- 'host_full'
- 'resource_details_host'
output:
type: string
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
passiveChecks:
type: bool
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
services:
type: array<Centreon\Domain\Monitoring\Service>
groups:
- 'host_full'
- 'host_with_services'
- 'resource_details_host'
state:
type: int
groups:
- 'host_min'
- 'host_main'
- 'host_full'
- 'resource_details_host'
stateType:
type: int
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
timezone:
type: string
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
scheduledDowntimeDepth:
type: int
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
criticality:
type: string
groups:
- 'host_main'
- 'host_full'
- 'resource_details_host'
downtimes:
type: array<Centreon\Domain\Downtime\Downtime>
groups:
- 'host_full'
- 'resource_details_host'
acknowledgement:
type: Centreon\Domain\Acknowledgement\Acknowledgement
groups:
- 'host_full'
- 'resource_details_host'
flapping:
type: bool
groups:
- 'host_full'
- 'resource_details_host'
percentStateChange:
type: double
groups:
- 'host_full'
- 'host_full'
- 'resource_details_host'
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Centreon\Domain\Monitoring\Model\ResourceDetailsHost:
exclusion_policy: none
virtual_properties:
getDuration:
name: getDuration
serialized_name: duration
type: string
groups:
- 'resource_details_host'
properties:
tries:
type: string
accessor:
getter: getTriesTranslatable
groups:
- 'resource_details_host'
parent:
type: Centreon\Domain\Monitoring\ResourceStatus
groups:
- 'resource_details_host'
status:
type: Centreon\Domain\Monitoring\ResourceStatus
groups:
- 'resource_details_host'
poller_name:
type: string
groups:
- 'resource_details_host'
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Centreon\Domain\Monitoring\Model\ResourceDetailsService:
exclusion_policy: none
virtual_properties:
getDuration:
name: getDuration
serialized_name: duration
type: string
groups:
- 'resource_details_service'
properties:
tries:
type: string
accessor:
getter: getTriesTranslatable
groups:
- 'resource_details_service'
parent:
type: Centreon\Domain\Monitoring\ResourceStatus
groups:
- 'resource_details_service'
status:
type: Centreon\Domain\Monitoring\ResourceStatus
groups:
- 'resource_details_service'
poller_name:
type: string
groups:
- 'resource_details_service'
Loading

0 comments on commit 9997cf6

Please sign in to comment.