blob: abf951f1d822dd651da4a17d942c740ed23ef10e [file] [log] [blame]
Bogumil Zebek483ccbf2020-03-25 11:54:11 +01001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3.. Copyright 2020 NOKIA
4
Tomasz Wrobelc1ad93c2020-04-16 09:28:23 +02005.. _cert_logs:
6
Bogumil Zebek483ccbf2020-03-25 11:54:11 +01007Logging
8=======
9
Tomasz Wrobel71986212020-03-26 09:43:41 +010010Certification Service API
11--------------------------
Aleksandra Maciaga946b3dd2020-04-16 21:46:06 +020012To see console Certification Service logs use:
Tomasz Wrobel71986212020-03-26 09:43:41 +010013
Aleksandra Maciaga946b3dd2020-04-16 21:46:06 +020014- Docker:
Bogumil Zebek483ccbf2020-03-25 11:54:11 +010015
Aleksandra Maciaga946b3dd2020-04-16 21:46:06 +020016.. code-block:: bash
Bogumil Zebek483ccbf2020-03-25 11:54:11 +010017
Aleksandra Maciaga946b3dd2020-04-16 21:46:06 +020018 docker logs <cert-service-container-name>
19
20- Kubernetes:
21
22.. code-block:: bash
23
24 kubectl logs <cert-service-pod-name>
25
26Console logs contain logs for logging levels from **DEBUG** to **ERROR**.
27
28Certification Service logs for different logging levels are available in the container:
29
30- Docker:
31
32.. code-block:: bash
33
34 docker exec -it <cert-service-container-name> bash
35
36- Kubernetes:
37
38.. code-block:: bash
39
40 kubectl exec -it <cert-service-pod-name> bash
Bogumil Zebek483ccbf2020-03-25 11:54:11 +010041
42Path to logs:
43
44 /var/log/onap/aaf/certservice
45
46Available log files:
Aleksandra Maciaga946b3dd2020-04-16 21:46:06 +020047
48 - audit.log - contains logs for **INFO** logging level
49 - debug.log - contains logs for logging levels from **DEBUG** to **ERROR**
50 - error.log - contains logs for **ERROR** logging level
51
52User cannot change logging levels.
Bogumil Zebek483ccbf2020-03-25 11:54:11 +010053
54
Tomasz Wrobelc1ad93c2020-04-16 09:28:23 +020055
Tomasz Wrobel71986212020-03-26 09:43:41 +010056Certification Service Client
57----------------------------
Aleksandra Maciaga946b3dd2020-04-16 21:46:06 +020058To see console Certification Service Client logs use :
Tomasz Wrobel71986212020-03-26 09:43:41 +010059
60- Docker:
61
62.. code-block:: bash
63
Aleksandra Maciaga946b3dd2020-04-16 21:46:06 +020064 docker logs <cert-service-client-container-name>
Tomasz Wrobel71986212020-03-26 09:43:41 +010065
66- Kubernetes:
Aleksandra Maciaga946b3dd2020-04-16 21:46:06 +020067 CertService Client is used as init container in other components. In the following example:
68 - *<some-component-pod-name>* refers to the component that uses CertService Client as init container
69 - *<cert-service-client-init-container-name>* refers to name of init container used by the mentioned component. It can be found by executing *'kubectl descrine pod <some-component-pod-name>'* and looking into 'Init Containers section'
70
Tomasz Wrobel71986212020-03-26 09:43:41 +010071.. code-block:: bash
Aleksandra Maciaga946b3dd2020-04-16 21:46:06 +020072
73 kubectl logs <some-component-pod-name> -c <cert-service-client-init-container-name>
Tomasz Wrobel71986212020-03-26 09:43:41 +010074
75
Tomasz Wrobel71986212020-03-26 09:43:41 +010076
Aleksandra Maciaga946b3dd2020-04-16 21:46:06 +020077| Container stops after execution, so all logs available are printed to console.
78| User cannot change logging levels.
Tomasz Wrobel71986212020-03-26 09:43:41 +010079
80Client application exits with following exit codes:
81
82
83+-------+------------------------------------------------+
84| Code | Information |
85+=======+================================================+
86| 0 | Success |
87+-------+------------------------------------------------+
88| 1 | Invalid client configuration |
89+-------+------------------------------------------------+
90| 2 | Invalid CSR configuration |
91+-------+------------------------------------------------+
92| 3 | Fail in key pair generation |
93+-------+------------------------------------------------+
94| 4 | Fail in CSR generation |
95+-------+------------------------------------------------+
96| 5 | CertService HTTP unsuccessful response |
97+-------+------------------------------------------------+
98| 6 | Internal HTTP Client connection problem |
99+-------+------------------------------------------------+
100| 7 | Fail in PKCS12 conversion |
101+-------+------------------------------------------------+
102| 8 | Fail in Private Key to PEM Encoding |
103+-------+------------------------------------------------+
Aleksandra Maciaga946b3dd2020-04-16 21:46:06 +0200104| 9 | Wrong TLS configuration |
105+-------+------------------------------------------------+