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

Commit

Permalink
Merge branch 'develop' into MON-12296
Browse files Browse the repository at this point in the history
  • Loading branch information
kduret authored Jul 18, 2022
2 parents 5f4adb9 + 1c08fff commit 6eb2353
Show file tree
Hide file tree
Showing 73 changed files with 2,591 additions and 281 deletions.
3 changes: 3 additions & 0 deletions config/packages/Centreon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jms_serializer:
infrastructure:
namespace_prefix: "Centreon\\Infrastructure"
path: '%kernel.project_dir%/config/packages/serializer/Infrastructure'
core:
namespace_prefix: "Core\\"
path: '%kernel.project_dir%/config/packages/serializer/Core'
parameters:
api.header: "Api-Version"
api.version.latest: "22.10"
Expand Down
8 changes: 4 additions & 4 deletions config/packages/serializer/Centreon/Monitoring.Resource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ Centreon\Domain\Monitoring\Resource:
groups:
- 'resource_main'
- 'resource_parent'
severityLevel:
type: int
groups:
- 'resource_main'
chartUrl:
type: string
groups:
Expand Down Expand Up @@ -123,3 +119,7 @@ Centreon\Domain\Monitoring\Resource:
type: bool
groups:
- 'resource_main'
severity:
type: Core\Severity\RealTime\Domain\Model\Severity
groups:
- 'resource_main'
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ Centreon\Domain\Monitoring\ResourceFilter:
type: array<string>
monitoringServerNames:
type: array<string>
serviceSeverityNames:
type: array<string>
hostSeverityNames:
type: array<string>
serviceSeverityLevels:
type: array<integer>
hostSeverityLevels:
type: array<integer>
statusTypes:
type: array<string>
onlyWithPerformanceData:
Expand Down
14 changes: 14 additions & 0 deletions config/packages/serializer/Core/Domain.RealTime.Model.Icon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Core\Domain\RealTime\Model\Icon:
properties:
id:
type: integer
groups:
- 'core_icon_main'
name:
type: string
groups:
- 'core_icon_main'
url:
type: string
groups:
- 'core_icon_main'
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Core\Severity\RealTime\Domain\Model\Severity:
virtual_properties:
getTypeAsString:
name: getTypeAsString
serialized_name: type
type: string
groups:
- 'severity_main'
properties:
id:
type: integer
groups:
- 'severity_main'
name:
type: string
groups:
- 'severity_main'
level:
type: integer
groups:
- 'severity_main'
icon:
type: Core\Domain\RealTime\Model\Icon
groups:
- 'severity_main'
32 changes: 32 additions & 0 deletions config/packages/validator/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,38 @@ Centreon\Domain\Monitoring\ResourceFilter:
- Type:
type: string
groups: [Default]
serviceSeverityNames:
- Type:
type: array
groups: [Default]
- All:
- Type:
type: string
groups: [Default]
hostSeverityNames:
- Type:
type: array
groups: [Default]
- All:
- Type:
type: string
groups: [Default]
serviceSeverityLevels:
- Type:
type: array
groups: [Default]
- All:
- Type:
type: integer
groups: [Default]
hostSeverityLevels:
- Type:
type: array
groups: [Default]
- All:
- Type:
type: integer
groups: [Default]
statusTypes:
- Type:
type: array
Expand Down
14 changes: 14 additions & 0 deletions config/routes/Centreon/monitoring/severity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
centreon.severity.realtime.findHostSeverities:
methods: "GET"
path: "/monitoring/severities/host"
controller: >-
Core\Severity\RealTime\Infrastructure\API\FindSeverity\FindHostSeverityController
condition: "request.attributes.get('version') >= 22.04"

centreon.severity.realtime.findServiceSeverities:
methods: "GET"
path: "/monitoring/severities/service"
controller: >-
Core\Severity\RealTime\Infrastructure\API\FindSeverity\FindServiceSeverityController
condition: "request.attributes.get('version') >= 22.04"
64 changes: 57 additions & 7 deletions doc/API/ResourceHostDetail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@ Monitoring.HostDetail:
type: boolean
description: "Indicates whether the check script is active or not"
example: true
severity_level:
type: integer
nullable: true
description: "Indicates the severity level"
example: 1
parent: null
icon:
type: object
Expand All @@ -145,12 +140,67 @@ Monitoring.HostDetail:
id:
type: integer
format: int64
description: "ID of the hostgroup"
description: "ID of the host group"
example: 28
name:
type: string
description: "Name of the hostgroup"
description: "Name of the host group"
example: "Linux-Servers"
categories:
type: object
properties:
id:
type: integer
format: int64
description: "ID of the host category"
example: 28
name:
type: string
description: "Name of the host category"
example: "All-Cpu-Services"
configuration_uri:
type: string
nullable: true
description: "Internal URI to reach category configuration"
severity:
type: object
nullable: true
properties:
id:
type: integer
format: int64
description: "ID of the severity"
example: 28
name:
type: string
description: "Name of the severity"
example: "High"
type:
type: string
description: "Type of the severity"
enum: ['host', 'service']
level:
type: integer
description: "Level of the severity"
minimum: 0
maximum: 100
example: 50
icon:
type: object
properties:
id:
type: integer
format: int64
description: "ID of the icon"
example: 10
name:
type: string
description: "Name of the icon"
example: "dog.png"
url:
type: string
description: "URL of the icon"
example: "baseUri/ppm/dog.png"
acknowledgement:
type: object
nullable: true
Expand Down
69 changes: 61 additions & 8 deletions doc/API/ResourceServiceDetail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,10 @@ Monitoring.ServiceDetail:
type: boolean
description: "Indicates whether the check script is active or not"
example: true
severity_level:
type: integer
nullable: true
description: "Indicates the severity level"
example: 1
parent:
$ref: './ResourceHostDetail.yaml'
icon:
type: object
nullable: true
properties:
name:
type: string
Expand All @@ -148,12 +142,71 @@ Monitoring.ServiceDetail:
id:
type: integer
format: int64
description: "ID of the servicegroup"
description: "ID of the service group"
example: 28
name:
type: string
description: "Name of the service group"
example: "All-Cpu-Services"
configuration_uri:
type: string
nullable: true
description: "Internal URI to reach group configuration"
categories:
type: object
properties:
id:
type: integer
format: int64
description: "ID of the service category"
example: 28
name:
type: string
description: "Name of the servicegroup"
description: "Name of the service category"
example: "All-Cpu-Services"
configuration_uri:
type: string
nullable: true
description: "Internal URI to reach category configuration"
severity:
type: object
nullable: true
properties:
id:
type: integer
format: int64
description: "ID of the severity"
example: 28
name:
type: string
description: "Name of the severity"
example: "High"
type:
type: string
description: "Type of the severity"
enum: ['host', 'service']
level:
type: integer
description: "Level of the severity"
minimum: 0
maximum: 100
example: 50
icon:
type: object
properties:
id:
type: integer
format: int64
description: "ID of the icon"
example: 10
name:
type: string
description: "Name of the icon"
example: "dog.png"
url:
type: string
description: "URL of the icon"
example: "baseUri/ppm/dog.png"
acknowledgement:
type: object
nullable: true
Expand Down
Loading

0 comments on commit 6eb2353

Please sign in to comment.