Our free community-driven project includes the latest technology and features delivered through a rapid release cycle.
24 |
25 |
26 |
Meridian
27 |
Meridian is a subscription-based, optimized and stable version of the OpenNMS platform.
28 |
29 |
30 |
31 |
32 |
33 |
54 |
--------------------------------------------------------------------------------
/test-api/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.opennms.integration.api
4 | api-project
5 | 2.0.0-SNAPSHOT
6 |
7 | 4.0.0
8 | test-api
9 | OpenNMS Integration API :: Test API
10 | bundle
11 |
12 |
13 |
14 | junit
15 | junit
16 | compile
17 |
18 |
19 | org.hamcrest
20 | hamcrest-all
21 | compile
22 |
23 |
24 | org.apache.logging.log4j
25 | log4j-slf4j-impl
26 | compile
27 |
28 |
29 | org.apache.logging.log4j
30 | log4j-core
31 | compile
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/sample/src/main/resources/poller/poller-configuration1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | IPADDR IPLIKE 2.*.*.*
5 |
6 |
7 | RRA:AVERAGE:0.5:1:2016
8 | RRA:AVERAGE:0.5:12:1488
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | zzz from poll-outages.xml zzz
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/sample/README.md:
--------------------------------------------------------------------------------
1 | # Sample Project
2 | This project provides samples to development different OpenNMS Plugin API Extensions which can be deployed at
3 | runtime to OpenNMS platform as plugins.
4 |
5 | ## UI Extension
6 | UI extension is a plugin to be deployed as WEB UI dynamic component at runtime.
7 |
8 | ### Steps to create UI extension
9 | - Create UI Extension Vue3 project, build it as external component. Refer [ui-extension](../ui-extension/README.md) for
10 | more information
11 | - Create a subfolder under resource folder for example ui-ext used as UI component folder
12 | - Copy the style.css and .es.js to the ui-ext folder
13 | - Create an extension class implements **UIExtension** interface, e.g. **SampleUIExtension**
14 | - Initial the UI extension class in the blueprint file as the following
15 | ```
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | ```
25 | - After the bundle and feature build succeed, install **opennms-plugin-sample** Karaf feature to the running OpenNMS
26 | platform. The extension UI will be rendered and available in the browser
27 |
--------------------------------------------------------------------------------
/archetypes/example-kar-plugin/src/main/resources/archetype-resources/README.md:
--------------------------------------------------------------------------------
1 | # OpenNMS ${pluginName} Plugin
2 |
3 | ## Overview
4 |
5 | This plugin was generated by the OPA archetype and is used as example project layout.
6 |
7 | The generated plugin contains code examples to demonstrate how to create a:
8 | * Karaf Shell Command (see StatsCommand & TopologyCommand)
9 | * REST Endpoint (see WebhookHandler & WebhookHandlerImpl)
10 | * Event Configuration Extension (see EventConfExtension)
11 | * Alarm Lifecycle Listener (see AlarmForwarder)
12 |
13 | ## Developing
14 |
15 |
16 | Build and install the plugin into your local Maven repository using:
17 |
18 | ```
19 | mvn clean install
20 | ```
21 |
22 | ## Deploying through features file
23 |
24 | From the OpenNMS Karaf shell:
25 | ```
26 | feature:repo-add mvn:${groupId}/karaf-features/${version}/xml
27 | feature:install opennms-plugins-${pluginId}
28 | ```
29 |
30 | ## Deploying through kar file
31 |
32 | ```
33 | cp assembly/kar/target/opennms-${pluginId}-plugin.kar /opt/opennms/deploy/
34 | feature:install opennms-plugins-${pluginId}
35 | ```
36 |
37 | ## Update automatically:
38 | ```
39 | bundle:watch *
40 | ```
41 |
42 | ## Features
43 |
44 | Once installed, the plugin makes the following Karaf shell commands available:
45 | * opennms-${pluginId}:stats
46 | * opennms-${pluginId}:push-topology
47 |
48 | You can also access the REST endpoint mounted by the plugin at `http://localhost:8980/opennms/rest/${pluginId}/ping`
49 |
--------------------------------------------------------------------------------
/archetypes/example-kar-plugin/src/main/resources/archetype-resources/plugin/src/main/resources/events/plugin.ext.events.xml:
--------------------------------------------------------------------------------
1 | #set( $symbol_pound = '#' )
2 | #set( $symbol_dollar = '$' )
3 | #set( $symbol_escape = '\' )
4 |
5 |
6 | uei.opennms.org/${pluginId}Plugin/sendEventSuccessful
7 | ${pluginName}: Successfully sent event
8 | Successfully sent event via REST API for alarm with reduction key: %parm[reductionKey]%
9 | ${pluginName}: Successfully sent event for alarm: %parm[reductionKey]%
10 | Normal
11 |
13 |
14 |
15 | uei.opennms.org/${pluginId}Plugin/sendEventFailed
16 | ${pluginName}: Failed to forward event
17 | Failed to sent event via REST API for alarm with reduction key: %parm[reductionKey]%. Message is: %parm[message]%
18 | ${pluginName}: Failed to sent event for alarm: %parm[reductionKey]%
19 | Critical
20 |
21 |
22 |
--------------------------------------------------------------------------------
/utils/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.opennms.integration.api
4 | api-project
5 | 2.0.0-SNAPSHOT
6 |
7 | 4.0.0
8 | org.opennms.integration.api.utils
9 | OpenNMS Integration API :: Utils
10 | bundle
11 |
12 |
13 |
14 | org.slf4j
15 | slf4j-api
16 |
17 |
18 |
19 | org.opennms.integration.api
20 | api
21 |
22 |
23 | org.opennms.integration.api
24 | common
25 |
26 |
27 |
28 | junit
29 | junit
30 | test
31 |
32 |
33 | org.hamcrest
34 | hamcrest-all
35 | test
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/requisition/SnmpPrimaryType.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.requisition;
30 |
31 | public enum SnmpPrimaryType {
32 | NOT_ELIGIBLE,
33 | SECONDARY,
34 | PRIMARY
35 | }
36 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/thresholding/ServiceStatus.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.thresholding;
30 |
31 | /**
32 | * @since 1.0.0
33 | */
34 | public enum ServiceStatus {
35 | ON,
36 | OFF
37 | }
38 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/datacollection/Collect.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.datacollection;
30 |
31 | import java.util.List;
32 |
33 | public interface Collect {
34 |
35 | List getIncludeGroups();
36 | }
37 |
--------------------------------------------------------------------------------
/archetypes/example-kar-plugin/src/main/resources/archetype-resources/plugin/src/test/java/AlertTest.java:
--------------------------------------------------------------------------------
1 | #set( $symbol_pound = '#' )
2 | #set( $symbol_dollar = '$' )
3 | #set( $symbol_escape = '\' )
4 | package ${package};
5 |
6 | import java.time.Instant;
7 |
8 | import org.json.JSONException;
9 | import org.junit.Test;
10 | import ${package}.model.Alert;
11 | import org.skyscreamer.jsonassert.JSONAssert;
12 |
13 | import com.fasterxml.jackson.core.JsonProcessingException;
14 | import com.fasterxml.jackson.databind.ObjectMapper;
15 |
16 | public class AlertTest {
17 |
18 | private ObjectMapper mapper = new ObjectMapper();
19 |
20 | /**
21 | * Verifies that the object is serialized to JSON as expected.
22 | */
23 | @Test
24 | public void canSerializeToJson() throws JsonProcessingException, JSONException {
25 | Alert alert = new Alert();
26 | alert.setStatus(Alert.Status.CRITICAL);
27 | alert.setTimestamp(Instant.ofEpochSecond(1402302570));
28 | alert.setDescription("CPU is above upper limit (91%)");
29 | alert.setAttribute("my_unique_attribute", "my_unique_value");
30 |
31 | String expectedJson = "{\n" +
32 | " \"status\": \"critical\",\n" +
33 | " \"timestamp\": 1402302570,\n" +
34 | " \"description\": \"CPU is above upper limit (91%)\",\n" +
35 | " \"my_unique_attribute\": \"my_unique_value\"\n" +
36 | "}";
37 | JSONAssert.assertEquals(expectedJson, mapper.writeValueAsString(alert), false);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/model/TopologyRef.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.model;
30 |
31 | /**
32 | * @author mbrooks
33 | * @since 1.0.0
34 | */
35 | interface TopologyRef {
36 | String getId();
37 |
38 | String getTooltipText();
39 | }
40 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/thresholding/Threshold.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.thresholding;
30 |
31 | /**
32 | * @since 1.0.0
33 | */
34 | public interface Threshold extends Basethresholddef {
35 |
36 | String getDsName();
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/thresholding/Parameter.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.thresholding;
30 |
31 | /**
32 | * @since 1.0.0
33 | */
34 | public interface Parameter {
35 |
36 | String getKey();
37 |
38 | String getValue();
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/archetypes/example-kar-plugin/src/main/resources/archetype-resources/plugin/src/test/java/TopologyTest.java:
--------------------------------------------------------------------------------
1 | #set( $symbol_pound = '#' )
2 | #set( $symbol_dollar = '$' )
3 | #set( $symbol_escape = '\' )
4 | package ${package};
5 |
6 | import org.json.JSONException;
7 | import org.junit.Test;
8 | import ${package}.model.Topology;
9 | import org.skyscreamer.jsonassert.JSONAssert;
10 |
11 | import com.fasterxml.jackson.core.JsonProcessingException;
12 | import com.fasterxml.jackson.databind.ObjectMapper;
13 |
14 | public class TopologyTest {
15 |
16 | private ObjectMapper mapper = new ObjectMapper();
17 |
18 | /**
19 | * Verifies that the object is serialized to JSON as expected.
20 | */
21 | @Test
22 | public void canSerializeToJson() throws JsonProcessingException, JSONException {
23 | Topology topology = new Topology();
24 | topology.addLink("host", "check");
25 | topology.addLink("host", "cluster");
26 |
27 | String expectedJson = "{ \n" +
28 | " \"links\":[ \n" +
29 | " { \n" +
30 | " \"source\":\"host\",\n" +
31 | " \"target\":\"check\"\n" +
32 | " },\n" +
33 | " { \n" +
34 | " \"source\":\"host\",\n" +
35 | " \"target\":\"cluster\"\n" +
36 | " }\n" +
37 | " ]\n" +
38 | "}";
39 | JSONAssert.assertEquals(expectedJson, mapper.writeValueAsString(topology), false);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/thresholding/ExcludeRange.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.thresholding;
30 |
31 | /**
32 | * @since 1.0.0
33 | */
34 | public interface ExcludeRange {
35 |
36 | String getBegin();
37 |
38 | String getEnd();
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/thresholding/IncludeRange.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.thresholding;
30 |
31 | /**
32 | * @since 1.0.0
33 | */
34 | public interface IncludeRange {
35 |
36 | String getBegin();
37 |
38 | String getEnd();
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/thresholding/Filter.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.thresholding;
30 |
31 | import java.util.Optional;
32 |
33 | /**
34 | * @since 1.0.0
35 | */
36 | public interface Filter {
37 |
38 | Optional getContent();
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/datacollection/IpList.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.datacollection;
30 |
31 | import java.util.List;
32 |
33 | public interface IpList {
34 |
35 | List getIpAddresses();
36 |
37 | List getIpAddressMasks();
38 | }
39 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/requisition/RequisitionRequest.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.requisition;
30 |
31 | /**
32 | * Marker interface used for requests in the {@link RequisitionProvider}.
33 | *
34 | * @author jwhite
35 | */
36 | public interface RequisitionRequest { }
37 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/datacollection/graphs/GraphPropertiesExtension.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.datacollection.graphs;
30 |
31 | import java.util.List;
32 |
33 | public interface GraphPropertiesExtension {
34 |
35 | List getPrefabGraphs();
36 | }
37 |
--------------------------------------------------------------------------------
/archetypes/example-kar-plugin/src/main/resources/archetype-resources/plugin/src/main/java/shell/TopologyCommand.java:
--------------------------------------------------------------------------------
1 | #set( $symbol_pound = '#' )
2 | #set( $symbol_dollar = '$' )
3 | #set( $symbol_escape = '\' )
4 | package ${package}.shell;
5 |
6 | import java.util.List;
7 | import java.util.concurrent.CompletableFuture;
8 |
9 | import org.apache.karaf.shell.api.action.Action;
10 | import org.apache.karaf.shell.api.action.Command;
11 | import org.apache.karaf.shell.api.action.lifecycle.Reference;
12 | import org.apache.karaf.shell.api.action.lifecycle.Service;
13 | import ${package}.TopologyForwarder;
14 | import ${package}.model.Topology;
15 |
16 | @Command(scope = "opennms-${pluginId}", name = "push-topology", description = "Push the topology")
17 | @Service
18 | public class TopologyCommand implements Action {
19 |
20 | @Reference
21 | private TopologyForwarder forwarder;
22 |
23 | @Override
24 | public Object execute() {
25 | System.out.println("Forwarding topologies...");
26 | final CompletableFuture> future = forwarder.forwardTopologies();
27 | future.whenComplete((topologies,ex) -> {
28 | if (ex == null) {
29 | System.out.printf("Successfully forwarded %d topologies.", topologies.size());
30 | } else {
31 | System.out.println("Error occurred forwarding topologies: " + ex);
32 | ex.printStackTrace();
33 | }
34 | });
35 | try {
36 | future.get();
37 | } catch (Exception e) {
38 | // pass
39 | }
40 | return null;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/collectors/resource/Resource.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.collectors.resource;
30 |
31 | public interface Resource {
32 |
33 | public enum Type {
34 | NODE,
35 | INTERFACE,
36 | GENERIC;
37 | };
38 |
39 | Type getResourceType();
40 | }
41 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/events/ManagedObject.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.events;
30 |
31 | /**
32 | * Managed object to which the alarms should be associated.
33 | *
34 | * @since 1.0.0
35 | */
36 | public interface ManagedObject {
37 |
38 | String getType();
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/timeseries/DataPoint.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2020 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.timeseries;
30 |
31 | import java.time.Instant;
32 |
33 | /** A value at a specific time for a specific metric. */
34 | public interface DataPoint {
35 |
36 | Instant getTime();
37 |
38 | Double getValue();
39 | }
40 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/collectors/resource/GenericTypeResource.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.collectors.resource;
30 |
31 | public interface GenericTypeResource extends Resource {
32 |
33 | NodeResource getNodeResource();
34 |
35 | String getType();
36 |
37 | String getInstance();
38 | }
39 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/thresholding/Expression.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.thresholding;
30 |
31 | /**
32 | * Threhsolding expression.
33 | *
34 | * @since 1.0.0
35 | */
36 | public interface Expression extends Basethresholddef {
37 |
38 | String getExpression();
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/health/Context.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018-2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.health;
30 |
31 | /**
32 | * Context related to the health check that is being performed.
33 | *
34 | * @author mvrueden
35 | * @since 1.0.0
36 | */
37 | public interface Context {
38 |
39 | long getTimeout();
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/coordination/Role.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.coordination;
30 |
31 | /**
32 | * The valid roles when participating in a redundant cluster.
33 | *
34 | * @author mbrooks
35 | * @since 1.0.0
36 | */
37 | public enum Role {
38 | UNKNOWN,
39 | ACTIVE,
40 | STANDBY
41 | }
42 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/events/MaskElement.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.events;
30 |
31 | import java.util.List;
32 |
33 | /**
34 | * Mask element.
35 | *
36 | * @since 1.0.0
37 | */
38 | public interface MaskElement {
39 |
40 | String getName();
41 |
42 | List getValues();
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/thresholding/ResourceFilter.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.thresholding;
30 |
31 | import java.util.Optional;
32 |
33 | /**
34 | * @since 1.0.0
35 | */
36 | public interface ResourceFilter {
37 |
38 | Optional getContent();
39 |
40 | String getField();
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/pollers/ServicePollerClient.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.pollers;
30 |
31 | import org.opennms.integration.api.v1.annotations.Consumable;
32 |
33 | /**
34 | * Runs the poller.
35 | */
36 | @Consumable
37 | public interface ServicePollerClient {
38 |
39 | PollerRequestBuilder poll();
40 | }
41 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/timeseries/Sample.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2020 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.timeseries;
30 |
31 | import java.time.Instant;
32 |
33 | /** A datapoint at a specific time for a specific metric. */
34 | public interface Sample {
35 |
36 | Metric getMetric();
37 |
38 | Instant getTime();
39 |
40 | Double getValue();
41 | }
42 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/datacollection/SystemDef.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.datacollection;
30 |
31 | public interface SystemDef {
32 |
33 | String getName();
34 |
35 | String getSysoid();
36 |
37 | String getSysoidMask();
38 |
39 | IpList getIpList();
40 |
41 | Collect getCollect();
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/events/LogMessage.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.events;
30 |
31 | /**
32 | * The log message to use for a given event definition.
33 | *
34 | * @since 1.0.0
35 | */
36 | public interface LogMessage {
37 |
38 | String getContent();
39 |
40 | LogMsgDestType getDestination();
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/events/UpdateField.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.events;
30 |
31 | /**
32 | * Fields to update when reducing a new event on the alarm.
33 | *
34 | * @since 1.0.0
35 | */
36 | public interface UpdateField {
37 |
38 | String getName();
39 |
40 | boolean isUpdatedOnReduction();
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/detectors/DetectResults.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.detectors;
30 |
31 | /**
32 | * Encapsulate service detection results.
33 | */
34 | public interface DetectResults {
35 |
36 | /**
37 | * @return true if the service was detected, false otherwise
38 | */
39 | boolean isServiceDetected();
40 | }
41 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/runtime/Container.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.runtime;
30 |
31 | /**
32 | * Enumeration of the container (JVM) in which the API is currently running.
33 | *
34 | * @author jwhite
35 | * @since 1.0.0
36 | */
37 | public enum Container {
38 | OPENNMS,
39 | MINION,
40 | SENTINEL,
41 | OTHER;
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/collector/Parameter.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2022 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2022 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.collector;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * Parameter of a collector.
35 | */
36 | @Model
37 | public interface Parameter {
38 |
39 | String getKey();
40 |
41 | String getValue();
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/thresholding/FilterOperator.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.thresholding;
30 |
31 | /**
32 | * @since 1.0.0
33 | */
34 | public enum FilterOperator {
35 |
36 | AND,
37 |
38 | OR;
39 |
40 | public String getEnumName() {
41 | return this.toString().toLowerCase();
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/datacollection/MibObj.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.datacollection;
30 |
31 | public interface MibObj {
32 |
33 | String getOid();
34 |
35 | String getInstance();
36 |
37 | String getAlias();
38 |
39 | String getType();
40 |
41 | String getMaxval();
42 |
43 | String getMinval();
44 | }
45 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/datacollection/MibObjProperty.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.datacollection;
30 |
31 | import java.util.List;
32 |
33 | public interface MibObjProperty {
34 |
35 | String getInstance();
36 |
37 | String getAlias();
38 |
39 | String getClassName();
40 |
41 | List getParameters();
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/syslog/ParameterAssignment.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.syslog;
30 |
31 | /**
32 | * Assign a group extracted from the regex to a parameter.
33 | *
34 | * @since 1.0.0
35 | */
36 | public interface ParameterAssignment {
37 |
38 | int getGroupNumber();
39 |
40 | String getParameterName();
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/sample/src/main/resources/resource-types/jmx-resource.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/events/Parameter.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.events;
30 |
31 | /**
32 | * Parameters which are automatically added to the event.
33 | *
34 | * @since 1.0.0
35 | */
36 | public interface Parameter {
37 |
38 | String getName();
39 |
40 | String getValue();
41 |
42 | boolean shouldExpand();
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/model/MonitoredService.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2022 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2022 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.model;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | import java.util.List;
34 |
35 | @Model
36 | public interface MonitoredService {
37 |
38 | String getName();
39 |
40 | List getMetaData();
41 |
42 | boolean getStatus();
43 | }
44 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/collectors/CollectionRequest.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.collectors;
30 |
31 | import java.net.InetAddress;
32 |
33 | /**
34 | * Encapsulates collection request details for the collector to perform collect.
35 | */
36 | public interface CollectionRequest {
37 |
38 | InetAddress getAddress();
39 |
40 | int getNodeId();
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/graph/NodeRef.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2020-2020 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2020 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.graph;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * Reference to a node.
35 | *
36 | * @author mvrueden
37 | * @since 1.0.0
38 | */
39 | @Model
40 | public interface NodeRef {
41 | String getForeignSource();
42 | String getForeignId();
43 | }
44 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/events/Mask.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.events;
30 |
31 | import java.util.List;
32 |
33 | /**
34 | * A mask (i.e. filter) to use for a given event definition.
35 | *
36 | * @since 1.0.0
37 | */
38 | public interface Mask {
39 |
40 | List getMaskElements();
41 |
42 | List getVarbinds();
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/datacollection/SnmpDataCollection.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.datacollection;
30 |
31 | import java.util.List;
32 |
33 | public interface SnmpDataCollection {
34 |
35 | String getName();
36 |
37 | List getResourceTypes();
38 |
39 | List getGroups();
40 |
41 | List getSystemDefs();
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/runtime/Version.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.runtime;
30 |
31 | /**
32 | * Product version.
33 | *
34 | * @author jwhite
35 | * @since 1.0.0
36 | */
37 | public interface Version extends Comparable {
38 |
39 | int getMajor();
40 |
41 | int getMinor();
42 |
43 | int getPatch();
44 |
45 | boolean isSnapshot();
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/timeseries/IntrinsicTagNames.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2010-2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.timeseries;
30 |
31 | /** common tag names used to define the intrinsic tags of a metric. */
32 | public interface IntrinsicTagNames {
33 | String name = "name";
34 | String resourceId = "resourceId";
35 | @Deprecated // moved to meta tag names
36 | String mtype = "mtype";
37 | }
38 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/annotations/Consumable.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.annotations;
30 |
31 | /**
32 | * Interfaces marked with this annotation are made available for consumption for users of the API.
33 | *
34 | * Support for the different containers will vary on the implementation.
35 | *
36 | * @author jwhite
37 | * @since 1.0.0
38 | */
39 | public @interface Consumable { }
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/collectors/resource/CollectionSetResource.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.collectors.resource;
30 |
31 | import java.util.List;
32 |
33 | public interface CollectionSetResource {
34 |
35 | T getResource();
36 |
37 | List getStringAttributes();
38 |
39 | List getNumericAttributes();
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/datacollection/Group.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.datacollection;
30 |
31 | import java.util.List;
32 |
33 | public interface Group {
34 |
35 | String getName();
36 |
37 | String getIfType();
38 |
39 | List getMibObjs();
40 |
41 | List getProperties();
42 |
43 | List getIncludeGroups();
44 | }
45 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/events/Varbind.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.events;
30 |
31 | import java.util.List;
32 |
33 | /**
34 | * Varbind against which to filter the event.
35 | *
36 | * @since 1.0.0
37 | */
38 | public interface Varbind {
39 |
40 | String getTextualConvention();
41 |
42 | Integer getNumber();
43 |
44 | List getValues();
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/test-suites/tss-tests/src/test/java/org/opennms/integration/api/v1/timeseries/InMemoryStorageTest.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2006-2020 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2020 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.timeseries;
30 |
31 | /** An example how a plugin could be tested. */
32 | public class InMemoryStorageTest extends AbstractStorageIntegrationTest {
33 |
34 | @Override
35 | protected TimeSeriesStorage createStorage() {
36 | return new InMemoryStorage();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/datacollection/ResourceTypesExtension.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.datacollection;
30 |
31 | import java.util.List;
32 |
33 | import org.opennms.integration.api.v1.annotations.Exposable;
34 |
35 | /**
36 | * Expose resource types.
37 | */
38 | @Exposable
39 | public interface ResourceTypesExtension {
40 |
41 | List getResourceTypes();
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/requisition/RequisitionRepository.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.requisition;
30 |
31 | import org.opennms.integration.api.v1.annotations.Consumable;
32 | import org.opennms.integration.api.v1.config.requisition.Requisition;
33 |
34 | @Consumable
35 | public interface RequisitionRepository {
36 |
37 | Requisition getDeployedRequisition(String foreignSource);
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/timeseries/package-info.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2020 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing <license@opennms.org>
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.timeseries;
30 |
31 | /**
32 | * Contains the classes to be used by a timeseries implementation.
33 | * Opennms allows the storage of timeseries data in any timeseries database.
34 | * In order to add a new timeseries database implement
35 | * @{@link org.opennms.integration.api.v1.timeseries.TimeSeriesStorage}.
36 | */
37 |
38 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/syslog/SyslogMatchExtension.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.syslog;
30 |
31 | import java.util.List;
32 |
33 | import org.opennms.integration.api.v1.annotations.Exposable;
34 |
35 | /**
36 | * Used to expose syslog matches.
37 | *
38 | * @since 1.0.0
39 | */
40 | @Exposable
41 | public interface SyslogMatchExtension {
42 |
43 | List getSyslogMatches();
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/events/EventConfExtension.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.events;
30 |
31 | import java.util.List;
32 |
33 | import org.opennms.integration.api.v1.annotations.Exposable;
34 |
35 | /**
36 | * Used to expose event definitions.
37 | *
38 | * @since 1.0.0
39 | */
40 | @Exposable
41 | public interface EventConfExtension {
42 |
43 | List getEventDefinitions();
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/datacollection/Parameter.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.datacollection;
30 |
31 | /**
32 | * A simple key/value pair.
33 | *
34 | * This is defined as interface in order to avoid depending
35 | * on the model objects directly in the API package.
36 | *
37 | * @author jwhite
38 | */
39 | public interface Parameter {
40 |
41 | String getKey();
42 |
43 | String getValue();
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/scv/Credentials.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2022 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2022 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 | package org.opennms.integration.api.v1.scv;
29 |
30 | import java.util.Map;
31 | import java.util.Set;
32 |
33 | import org.opennms.integration.api.v1.annotations.Model;
34 |
35 | @Model
36 | public interface Credentials {
37 | String getUsername();
38 | String getPassword();
39 | String getAttribute(String key);
40 | Set getAttributeKeys();
41 | Map getAttributes();
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/collectors/ServiceCollectorClient.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.collectors;
30 |
31 | import org.opennms.integration.api.v1.annotations.Consumable;
32 |
33 | /**
34 | * Runs collector
35 | */
36 | @Consumable
37 | public interface ServiceCollectorClient {
38 |
39 | /**
40 | * Performs collect using {@link CollectorRequestBuilder}
41 | * @return
42 | */
43 | CollectorRequestBuilder collect();
44 | }
45 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/requisition/RequisitionAsset.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.requisition;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * @see "The provided model implementation can be found in the class ImmutableRequisitionAsset"
35 | * @since 1.0.0
36 | */
37 | @Model
38 | public interface RequisitionAsset {
39 |
40 | String getName();
41 |
42 | String getValue();
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/config/src/main/java/org/opennms/integration/api/xml/schema/thresholding/ServiceStatus.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.xml.schema.thresholding;
30 |
31 | import javax.xml.bind.annotation.XmlEnum;
32 | import javax.xml.bind.annotation.XmlEnumValue;
33 | import javax.xml.bind.annotation.XmlRootElement;
34 |
35 | @XmlRootElement(name="status")
36 | @XmlEnum
37 | public enum ServiceStatus {
38 | @XmlEnumValue("on")
39 | ON,
40 | @XmlEnumValue("off")
41 | OFF
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/thresholding/GroupDefinition.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.thresholding;
30 |
31 | import java.util.List;
32 |
33 | /**
34 | * A thresholding group definition.
35 | *
36 | * @since 1.0.0
37 | */
38 | public interface GroupDefinition {
39 |
40 | String getName();
41 |
42 | String getRrdRepository();
43 |
44 | List getThresholds();
45 |
46 | List getExpressions();
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/graph/VertexRef.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2020-2020 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2020 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.graph;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * Describes a reference to a {@link Vertex}.
35 | * Each {@link Vertex} is uniquely identifiable by its namespace and id.
36 | *
37 | * @author mvrueden
38 | * @since 1.0.0
39 | */
40 | @Model
41 | public interface VertexRef {
42 | String getNamespace();
43 | String getId();
44 | }
45 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/events/LogMsgDestType.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.events;
30 |
31 | /**
32 | * Log message destinations.
33 | *
34 | * @since 1.0.0
35 | */
36 | public enum LogMsgDestType {
37 | LOGNDISPLAY,
38 | DISPLAYONLY,
39 | LOGONLY,
40 | SUPPRESS,
41 | DONOTPERSIST,
42 | DISCARDTRAPS;
43 |
44 | @Override
45 | public String toString() {
46 | return this.name().toLowerCase();
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/thresholding/Service.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.thresholding;
30 |
31 | import java.util.List;
32 | import java.util.Optional;
33 |
34 | /**
35 | * @since 1.0.0
36 | */
37 | public interface Service {
38 |
39 | String getName();
40 |
41 | Long getInterval();
42 |
43 | Boolean getUserDefined();
44 |
45 | Optional getStatus();
46 |
47 | List getParameters();
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/timeseries/StorageException.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2020 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.timeseries;
30 |
31 | public class StorageException extends Exception {
32 |
33 | public StorageException(final String message) {
34 | super(message);
35 | }
36 |
37 | public StorageException (final Throwable e) {
38 | super(e);
39 | }
40 |
41 | public StorageException (final String message, Throwable e) {
42 | super(e);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/flows/FlowException.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2022 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2022 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.flows;
30 |
31 | public class FlowException extends Exception {
32 |
33 | public FlowException(final String message) {
34 | super(message);
35 | }
36 |
37 | public FlowException(final String message, final Throwable cause) {
38 | super(message, cause);
39 | }
40 |
41 | public FlowException(final Throwable cause) {
42 | super(cause);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/karaf-features/src/main/resources/sample.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | mvn:org.opennms.integration.api/karaf-features/${project.version}/xml
4 |
5 |
6 | opennms-integration-api
7 | mvn:commons-io/commons-io/${commonsIoVersion}
8 | mvn:org.opennms.integration.api.sample/sample-project/${project.version}
9 |
10 |
11 |
12 | sample-plugin-common
13 | blueprint:mvn:org.opennms.integration.api.sample/sample-project/${project.version}/xml/blueprint-core
14 |
15 |
16 |
17 | sample-plugin-common
18 | blueprint:mvn:org.opennms.integration.api.sample/sample-project/${project.version}/xml/blueprint-minion
19 |
20 |
21 |
22 | sample-plugin-common
23 | blueprint:mvn:org.opennms.integration.api.sample/sample-project/${project.version}/xml/blueprint-sentinel
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/datacollection/StrategyDefinition.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.datacollection;
30 |
31 | import java.util.List;
32 |
33 | /**
34 | * Used to define the strategy implementation (class)
35 | * and related attributes (parameters) to be used by the strategy.
36 | *
37 | * @author jesse
38 | */
39 | public interface StrategyDefinition {
40 |
41 | String getClazz();
42 |
43 | List getParameters();
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/poller/AddressRange.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2022 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2022 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.poller;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * Range of addresses
35 | */
36 | @Model
37 | public interface AddressRange {
38 |
39 | /**
40 | * Starting address of the range.
41 | */
42 | String getBegin();
43 |
44 | /**
45 | * Ending address of the range.
46 | */
47 | String getEnd();
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/thresholding/ThresholdingConfigExtension.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.thresholding;
30 |
31 | import java.util.List;
32 |
33 | import org.opennms.integration.api.v1.annotations.Exposable;
34 |
35 | /**
36 | * Used to expose thresholding group definitions.
37 | *
38 | * @since 1.0.0
39 | */
40 | @Exposable
41 | public interface ThresholdingConfigExtension {
42 |
43 | List getGroupDefinitions();
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/graph/status/StatusInfo.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2020-2020 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2020 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.graph.status;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 | import org.opennms.integration.api.v1.model.Severity;
33 |
34 | /**
35 | * Holds information about the status of a graph element.
36 | *
37 | * @author mvrueden
38 | * @since 1.0.0
39 | */
40 | @Model
41 | public interface StatusInfo {
42 | Severity getSeverity();
43 | long getCount();
44 | }
45 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/scv/SecureCredentialsVault.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2022 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2022 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 | package org.opennms.integration.api.v1.scv;
29 |
30 | import java.util.Set;
31 |
32 | import org.opennms.integration.api.v1.annotations.Consumable;
33 |
34 | @Consumable
35 | public interface SecureCredentialsVault {
36 |
37 | Set getAliases();
38 | Credentials getCredentials(String alias);
39 | void setCredentials(String alias, Credentials credentials);
40 |
41 | void deleteCredentials(String alias);
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/collectors/resource/StringAttribute.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.collectors.resource;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * @see "The provided model implementation can be found in the class ImmutableStringAttribute"
35 | * @since 1.0.0
36 | */
37 | @Model
38 | public interface StringAttribute {
39 |
40 | String getName();
41 |
42 | String getValue();
43 |
44 | String getGroup();
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/collector/AddressRange.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2022 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2022 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.collector;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * Range of addresses
35 | */
36 | @Model
37 | public interface AddressRange {
38 |
39 | /**
40 | * Starting address of the range.
41 | */
42 | String getBegin();
43 |
44 | /**
45 | * Ending address of the range.
46 | */
47 | String getEnd();
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/model/EventParameter.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.model;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * An event parameter.
35 | *
36 | * @see "The provided model implementation can be found in the class ImmutableEventParameter"
37 | * @author jwhite
38 | * @since 1.0.0
39 | */
40 | @Model
41 | public interface EventParameter {
42 |
43 | String getName();
44 |
45 | String getValue();
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/health/Response.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018-2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.health;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * The response of a health check.
35 | *
36 | * @see "The provided model implementation can be found in the class ImmutableResponse"
37 | * @author mvrueden
38 | * @since 1.0.0
39 | */
40 | @Model
41 | public interface Response {
42 |
43 | Status getStatus();
44 |
45 | String getMessage();
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/model/MetaData.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.model;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * Meta-data.
35 | *
36 | * @see "The provided model implementation can be found in the class ImmutableMetaData"
37 | * @author jwhite
38 | * @since 1.0.0
39 | */
40 | @Model
41 | public interface MetaData {
42 |
43 | String getContext();
44 |
45 | String getKey();
46 |
47 | String getValue();
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/collectors/resource/IpInterfaceResource.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.collectors.resource;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * @see "The provided model implementation can be found in the class ImmutableIpInterfaceResource"
35 | * @since 1.0.0
36 | */
37 | @Model
38 | public interface IpInterfaceResource extends Resource {
39 |
40 | NodeResource getNodeResource();
41 |
42 | String getInstance();
43 | }
44 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/thresholding/ThreshdConfigurationExtension.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.thresholding;
30 |
31 | import java.util.List;
32 |
33 | import org.opennms.integration.api.v1.annotations.Exposable;
34 |
35 | /**
36 | * Used to expose thresholding package and thresholder definitions.
37 | *
38 | * @since 1.0.0
39 | */
40 | @Exposable
41 | public interface ThreshdConfigurationExtension {
42 |
43 | List getPackages();
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/graph/GraphContainerCache.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2020-2020 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2020 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.graph;
30 |
31 | import org.opennms.integration.api.v1.annotations.Consumable;
32 |
33 | /**
34 | * Provides access to the underlying cache of all graph containers to manually invalidate a cached entry of {@link GraphContainer}.
35 | *
36 | * @author mvrueden
37 | * @since 1.0.0
38 | */
39 | @Consumable
40 | public interface GraphContainerCache {
41 | void invalidate(String containerId);
42 | }
43 |
--------------------------------------------------------------------------------
/sample/src/main/resources/blueprint-minion.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/poller/Parameter.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2022 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2022 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.poller;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * Parameters to be used for polling this service. E.g.: for polling HTTP, the
35 | * URL to hit is configurable via a parameter. Parameters are specific to the
36 | * service monitor.
37 | */
38 | @Model
39 | public interface Parameter {
40 |
41 | String getKey();
42 |
43 | String getValue();
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/requisition/RequisitionMetaData.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.requisition;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * @see "The provided model implementation can be found in the class ImmutableRequisitionMetaData"
35 | * @since 1.0.0
36 | */
37 | @Model
38 | public interface RequisitionMetaData {
39 |
40 | String getContext();
41 |
42 | String getKey();
43 |
44 | String getValue();
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/annotations/Exposable.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.annotations;
30 |
31 | /**
32 | * Interfaces marked with this annotation can be exposed by users of the API.
33 | *
34 | * These should be exposed in the OSGi registry, and will be automatically registered with the corresponding processes.
35 | *
36 | * Support for the different containers will vary on the implementation.
37 | *
38 | * @author jwhite
39 | * @since 1.0.0
40 | */
41 | public @interface Exposable { }
42 |
--------------------------------------------------------------------------------
/sample/src/main/resources/collector/collector-configuration2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | IPADDR != '0.0.0.0'
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/model/SnmpInterface.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.model;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * An SNMP interface.
35 | *
36 | * @see "The provided model implementation can be found in the class ImmutableSnmpInterface"
37 | * @author jwhite
38 | * @since 1.0.0
39 | */
40 | @Model
41 | public interface SnmpInterface {
42 |
43 | String getIfDescr();
44 |
45 | String getIfName();
46 |
47 | Integer getIfIndex();
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/timeseries/Tag.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2020 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.timeseries;
30 |
31 | /**
32 | * A key-value object describing an aspect of a Metric.
33 | * The value is mandatory, the key may be null.
34 | *
35 | * It is inspired by Metrics 2.0,
36 | * @see http://metrics20.org/spec/
37 | */
38 | public interface Tag extends Comparable {
39 | String getKey();
40 |
41 | String getValue();
42 |
43 | @Override
44 | int compareTo(Tag other);
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/events/AlarmData.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.events;
30 |
31 | import java.util.List;
32 |
33 | /**
34 | * Defines the alarm for a given event definition.
35 | *
36 | * @since 1.0.0
37 | */
38 | public interface AlarmData {
39 |
40 | String getReductionKey();
41 |
42 | AlarmType getType();
43 |
44 | String getClearKey();
45 |
46 | boolean isAutoClean();
47 |
48 | List getUpdateFields();
49 |
50 | ManagedObject getManagedObject();
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/annotations/Model.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.annotations;
30 |
31 | /**
32 | * Interfaces marked with this annotation have an implementation included in the API's common package. These interfaces
33 | * are likely to have additional methods added in the future.
34 | *
35 | * It is recommended to use the provided implementations whenever possible to avoid breaking changes in future API
36 | * updates.
37 | *
38 | * @author mbrooks
39 | * @since 1.0.0
40 | */
41 | public @interface Model {
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/model/TopologyPort.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.model;
30 |
31 | import org.opennms.integration.api.v1.annotations.Model;
32 |
33 | /**
34 | * @see "The provided model implementation can be found in the class ImmutableTopologyPort"
35 | * @author mbrooks
36 | * @since 1.0.0
37 | */
38 | @Model
39 | public interface TopologyPort extends TopologyRef {
40 | Integer getIfIndex();
41 |
42 | String getIfName();
43 |
44 | String getIfAddress();
45 |
46 | NodeCriteria getNodeCriteria();
47 | }
48 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/poller/Rrd.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2011-2014 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2022 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.poller;
30 |
31 | import java.util.List;
32 |
33 | import org.opennms.integration.api.v1.annotations.Model;
34 |
35 | /**
36 | * RRD parameters
37 | */
38 | @Model
39 | public interface Rrd {
40 |
41 | /**
42 | * Step size for the RRD, in seconds.
43 | */
44 | int getStep();
45 |
46 | /**
47 | * Round Robin Archive definitions. Format: "RRA:(AVERAGE|MIN|MAX|LAST):.*"
48 | */
49 | List getRras();
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/config/requisition/RequisitionMonitoredService.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2019 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.config.requisition;
30 |
31 | import java.util.List;
32 |
33 | import org.opennms.integration.api.v1.annotations.Model;
34 |
35 | /**
36 | * @see "The provided model implementation can be found in the class ImmutableRequisitionMonitoredService"
37 | * @since 1.0.0
38 | */
39 | @Model
40 | public interface RequisitionMonitoredService {
41 |
42 | String getName();
43 |
44 | List getMetaData();
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/timeseries/TimeSeriesFetchRequest.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2020 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.timeseries;
30 |
31 | import java.time.Duration;
32 | import java.time.Instant;
33 |
34 | public interface TimeSeriesFetchRequest {
35 |
36 | Metric getMetric();
37 |
38 | Instant getStart();
39 |
40 | Instant getEnd();
41 |
42 | /** the results can be aggregated (depending on the given aggregation function). They are bucketed in buckets the size of the step. */
43 | Duration getStep();
44 |
45 | Aggregation getAggregation();
46 | }
47 |
--------------------------------------------------------------------------------
/api/src/main/java/org/opennms/integration/api/v1/runtime/RuntimeInfo.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * This file is part of OpenNMS(R).
3 | *
4 | * Copyright (C) 2018 The OpenNMS Group, Inc.
5 | * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
6 | *
7 | * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
8 | *
9 | * OpenNMS(R) is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published
11 | * by the Free Software Foundation, either version 3 of the License,
12 | * or (at your option) any later version.
13 | *
14 | * OpenNMS(R) is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with OpenNMS(R). If not, see:
21 | * http://www.gnu.org/licenses/
22 | *
23 | * For more information contact:
24 | * OpenNMS(R) Licensing
25 | * http://www.opennms.org/
26 | * http://www.opennms.com/
27 | *******************************************************************************/
28 |
29 | package org.opennms.integration.api.v1.runtime;
30 |
31 | import org.opennms.integration.api.v1.annotations.Consumable;
32 |
33 | /**
34 | * Provides statistics about the current runtime environment.
35 | *
36 | * @author jwhite
37 | * @since 1.0.0
38 | */
39 | @Consumable
40 | public interface RuntimeInfo {
41 |
42 | Version getVersion();
43 |
44 | boolean isMeridian();
45 |
46 | Container getContainer();
47 |
48 | String getSystemId();
49 |
50 | String getSystemLocation();
51 |
52 | }
53 |
--------------------------------------------------------------------------------