Standalone TCA with EELF Logger
[dcaegen2/analytics/tca-gen2.git] / eelf-logger / eelf-logger-api / src / main / java / org / onap / dcae / utils / eelf / logger / api / info / NagiosAlertLevel.java
1 /*
2  * ================================================================================
3  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  * ============LICENSE_END=========================================================
17  *
18  */
19
20 package org.onap.dcae.utils.eelf.logger.api.info;
21
22 /**
23  * Enum for Nagios monitoring/alerting codes as per table below.
24  * <p>
25  * <table cellspacing=0 border=1>
26  * <tr><th>Return Code</th><th>Service State</th><th>Host State</th></tr>
27  * <tr><td>0</td><td>OK</td><td>UP</td></tr>
28  * <tr><td>1</td><td>WARNING</td><td>UP or DOWN/UNREACHABLE*</td></tr>
29  * <tr><td>2</td><td>CRITICAL</td><td>DOWN/UNREACHABLE</td></tr>
30  * <tr><td>3</td><td>UNKNOWN</td><td>DOWN/UNREACHABLE</td></tr>
31  * </table>
32  *
33  * @author Rajiv Singla
34  */
35 public enum NagiosAlertLevel implements LogInfo {
36
37     OK("0"),
38     WARNING("1"),
39     CRITICAL("2"),
40     UNKNOWN("3");
41
42     private String severityCode;
43
44     NagiosAlertLevel(final String severityCode) {
45         this.severityCode = severityCode;
46     }
47
48     public String getSeverityCode() {
49         return severityCode;
50     }
51
52 }