Expose Prometheus metrics for monitoring
[cps.git] / cps-application / src / main / resources / application.yml
1 #  ============LICENSE_START=======================================================\r
2 #  Modification (C) 2021 Nordix Foundation\r
3 #  Modification Copyright (C) 2021 Bell Canada.\r
4 #  ================================================================================\r
5 #  Licensed under the Apache License, Version 2.0 (the "License");\r
6 #  you may not use this file except in compliance with the License.\r
7 #  You may obtain a copy of the License at\r
8 #\r
9 #        http://www.apache.org/licenses/LICENSE-2.0\r
10 #  Unless required by applicable law or agreed to in writing, software\r
11 #  distributed under the License is distributed on an "AS IS" BASIS,\r
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13 #  See the License for the specific language governing permissions and\r
14 #  limitations under the License.\r
15 #\r
16 #  SPDX-License-Identifier: Apache-2.0\r
17 #  ============LICENSE_END=========================================================\r
18 \r
19 server:\r
20     port: 8080\r
21 \r
22 rest:\r
23     api:\r
24         cps-base-path: /cps/api\r
25         ncmp-base-path: /cps-ncmp/api\r
26 \r
27 spring:\r
28     main:\r
29         banner-mode: "off"\r
30     jpa:\r
31         ddl-auto: create\r
32         open-in-view: false\r
33         properties:\r
34             hibernate:\r
35                 enable_lazy_load_no_trans: true\r
36                 dialect: org.hibernate.dialect.PostgreSQLDialect\r
37 \r
38     datasource:\r
39         url: jdbc:postgresql://${DB_HOST}:5432/cpsdb\r
40         username: ${DB_USERNAME}\r
41         password: ${DB_PASSWORD}\r
42         driverClassName: org.postgresql.Driver\r
43         initialization-mode: always\r
44 \r
45     cache:\r
46         type: caffeine\r
47         cache-names: yangSchema\r
48         caffeine:\r
49             spec: maximumSize=10000,expireAfterAccess=10m\r
50 \r
51     liquibase:\r
52         change-log: classpath:changelog/changelog-master.yaml\r
53         labels: ${LIQUIBASE_LABELS}\r
54 \r
55     servlet:\r
56         multipart:\r
57             enabled: true\r
58             max-file-size: 100MB\r
59             max-request-size: 100MB\r
60 \r
61     kafka:\r
62         bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092}\r
63         security:\r
64             protocol: PLAINTEXT\r
65         producer:\r
66             value-serializer: org.springframework.kafka.support.serializer.JsonSerializer\r
67             client-id: cps-core\r
68 \r
69 notification:\r
70     data-updated:\r
71         enabled: false\r
72         topic: ${CPS_CHANGE_EVENT_TOPIC:cps.cfg-state-events}\r
73 \r
74 security:\r
75     # comma-separated uri patterns which do not require authorization\r
76     permit-uri: /manage/**,/swagger-ui/**,/swagger-resources/**,/v3/api-docs\r
77     auth:\r
78         username: ${CPS_USERNAME}\r
79         password: ${CPS_PASSWORD}\r
80 \r
81 # Actuator\r
82 management:\r
83     server:\r
84         port: 8081\r
85     endpoints:\r
86         web:\r
87             base-path: /manage\r
88             exposure:\r
89                 include: info,health,loggers,prometheus\r
90     endpoint:\r
91         health:\r
92             show-details: always\r
93             # kubernetes probes: liveness and readiness\r
94             probes:\r
95                 enabled: true\r
96 \r
97 logging:\r
98     level:\r
99         org:\r
100             springframework: INFO\r