Skip to content

Commit

Permalink
Merge branch 'develop' into mwa/jira/NMS-16986
Browse files Browse the repository at this point in the history
  • Loading branch information
mwajahatabbasi committed Jan 13, 2025
2 parents 22537a0 + aa0a6c0 commit 35ce305
Show file tree
Hide file tree
Showing 53 changed files with 1,550 additions and 130 deletions.
8 changes: 8 additions & 0 deletions container/features/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@
<feature>opennms-poller-monitors-core</feature>
<feature>opennms-telemetry-daemon</feature>
<feature>opennms-timeseries-api</feature>
<feature>opennms-timeseries-api</feature>
<feature>opennms-grpc-exporter</feature>
<feature>vaadin</feature>

<!-- minion features -->
Expand Down Expand Up @@ -812,6 +814,12 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.opennms.features.grpc</groupId>
<artifactId>org.opennms.features.grpc.exporter</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.opennms.container</groupId>
<artifactId>extender</artifactId>
Expand Down
8 changes: 8 additions & 0 deletions container/features/src/main/resources/features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2060,4 +2060,12 @@
<bundle>mvn:org.opennms.features/org.opennms.features.newts/${project.version}</bundle>
</feature>

<feature name="opennms-grpc-exporter" description="OpenNMS :: Grpc :: Exporter" version="${project.version}">
<feature version="${opennmsApiVersion}" dependency="true">opennms-integration-api</feature>
<bundle>mvn:com.google.protobuf/protobuf-java/${protobufVersion}</bundle>
<bundle>mvn:org.mapstruct/mapstruct/${mapstructVersion}</bundle>
<bundle>mvn:org.opennms.core.grpc/org.opennms.core.grpc.osgi/${project.version}</bundle>
<bundle>mvn:org.opennms.features.grpc/org.opennms.features.grpc.exporter/${project.version}</bundle>
</feature>

</features>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*******************************************************************************
* This file is part of OpenNMS(R).
*
* Copyright (C) 2024 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 2024 The OpenNMS Group, Inc.
* Copyright (C) 2025 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 2025 The OpenNMS Group, Inc.
*
* OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*******************************************************************************
* This file is part of OpenNMS(R).
*
* Copyright (C) 2024 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 2024 The OpenNMS Group, Inc.
* Copyright (C) 2025 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 2025 The OpenNMS Group, Inc.
*
* OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*******************************************************************************
* This file is part of OpenNMS(R).
*
* Copyright (C) 2024 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 1999-2024 The OpenNMS Group, Inc.
* Copyright (C) 2025 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 1999-2025 The OpenNMS Group, Inc.
*
* OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*******************************************************************************
* This file is part of OpenNMS(R).
*
* Copyright (C) 2024 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 1999-2024 The OpenNMS Group, Inc.
* Copyright (C) 2025 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 1999-2025 The OpenNMS Group, Inc.
*
* OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
*
Expand Down
9 changes: 9 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
opennms (33.1.2-1) stable; urgency=medium

* Release 33.1.2 contains a bug fix and a new feature.

For details on what has changed, see:
https://docs.opennms.com/horizon/33.1.2/index.html

-- OpenNMS Release Manager <[email protected]> Tue, 07 Jan 2024 10:30:00 -0500

opennms (33.1.1-1) stable; urgency=medium

* Release 33.1.1 contains bug fixes, security updates and new features.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The following example uses SASL/SCRAM with TLS:
----
config:edit org.opennms.core.ipc.kafka
config:property-set bootstrap.servers my-kafka-ip-1:9096,my-kafka-ip-2:9096
config:property-set security.protocol=SASL_SSL
config:property-set security.protocol SASL_SSL
config:property-set sasl.mechanism SCRAM-SHA-512
config:property-set sasl.jaas.config 'org.apache.kafka.common.security.scram.ScramLoginModule required username="opennms-ipc" password="kafka";'
config:update
Expand Down
7 changes: 3 additions & 4 deletions docs/modules/deployment/pages/minion/system-requirements.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ OpenNMS {page-component-title} runs on the following operating systems:
| Operating System | Supported Versions (64-bit)

| RHEL
| {compatible-rhel7} +
{compatible-rhel8}
| {compatible-rhel8} +
{compatible-rhel9}

| CentOS
| {compatible-centos7} +
{compatible-centos-stream}
| {compatible-centos-stream}

ifeval::["{page-component-title}" == "Horizon"]
| Debian
Expand Down
85 changes: 50 additions & 35 deletions docs/modules/deployment/pages/time-series-storage/newts/newts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,65 +9,80 @@ This section describes how to configure your {page-component-title} instance to

Follow these steps to set up Newts on your {page-component-title} instance:

. Create a configuration file with your time series database settings:
+
.Create a configuration file with the time series storage settings
[source, console]
----
sudo vi etc/opennms.properties.d/timeseries.properties
----

. Configure the storage strategy:
+
.Configure Newts as the time series strategy
[source, properties]
----
org.opennms.rrd.storeByForeignSource=true <1>
org.opennms.timeseries.strategy=newts <2>
# Configure storage strategy
org.opennms.rrd.storeByForeignSource=true<1>
org.opennms.timeseries.strategy=newts<2>
# One year in seconds
org.opennms.newts.config.ttl=31540000<3>
# Seven days in seconds
org.opennms.newts.config.resource_shard=604800<4>
# Configure Newts time series storage connection
org.opennms.newts.config.driver_settings_file=/opt/opennms/etc/cassandra-driver.conf<5>
----
<1> Associate time series data using the foreign source and ID instead of the database-generated node ID.
<2> Set time series strategy to use Newts.
If you are enabling the xref:time-series-storage/timeseries/time-series-storage.adoc#ga-dual-write-newts[dual write plugin] on an existing {page-component-title} installation and you want to keep historical metrics, make sure that the written data has expired before you set `org.opennms.timeseries.strategy` to `newts`.

. Configure the Newts time series storage connection:
+
[source, properties]
<1> Associate time series data by the foreign ID instead of the database-generated Node-ID.
<2> Set time series strategy to use `newts`.
<3> Retention rate for the time series data.
<4> Shard metrics every 7 days.
<5> The path to your driver configuration file

.Create a configuration file with the time series storage settings
[source, console]
----
org.opennms.newts.config.hostname=cassandra-ip1,cassandra-ip2 <1>
org.opennms.newts.config.keyspace=newts <2>
org.opennms.newts.config.port=9042 <3>
sudo vi etc/cassandra-driver.conf
----
<1> Host or IP addresses of the Cassandra cluster nodes.
Can be a comma-separated list.
<2> Name of the keyspace which is initialized and used.
<3> Port to connect to Cassandra.

. Set the retention rate and shard rate:
+
. Configure the Cassandra driver settings
[source, properties]
----
# One year in seconds
org.opennms.newts.config.ttl=31540000 <1>
# Seven days in seconds
org.opennms.newts.config.resource_shard=604800 <2>
datastax-java-driver {
basic.contact-points = [ "example-node1:9042", "example-node2:9042" ]<1>
session-keyspace = "newts"<2>
basic.load-balancing-policy {
local-datacenter = datacenter1<3>
}
advanced.auth-provider {
class = PlainTextAuthProvider <4>
username = cassandra
password = cassandra
}
}
----
<1> Retention rate for the time series data.
<2> Shard metrics every 7 days.

. (Optional) If your {page-component-title} data collection or polling intervals have been modified, set the query minimum and heartbeat rates:
<1> `Hostname:port` or `IP address:port` of one or more Cassandra cluster nodes.
<2> Name of the keyspace which is initialized and used.
<3> The local datacenter as defined by your Cassandra configuration
<4> The authentication provider to use with the supplied credentials

.(Optional) If your {page-component-title} data collection or polling intervals have been modified, set the query minimum and heartbeat rates:
+
[source, properties]
----
org.opennms.newts.query.minimum_step=30000 <1>
org.opennms.newts.query.heartbeat=45000 <2>
org.opennms.newts.query.heartbeat=450000 <2>
----
<1> The shortest collection interval configured for any collectable or pollable service, in milliseconds (in this case, 30 seconds).
<2> The communication interval for the Newts service, in milliseconds.
Should be set to 1.5 times the `maximum` value of the collection interval configured for any collectable or pollable service, in milliseconds (in this case, 45 seconds).
Should be set to 1.5 times the `maximum` value of the collection interval configured for any collectable or pollable service, in milliseconds (in this case, 450 seconds).

. Initialize the Newts schema in Cassandra:
.Initialize the Newts schema in Cassandra:
+
[source, console]
bin/newts init

. Connect to Cassandra using the CQL shell:
.Connect to Cassandra using the CQL shell:
+
[source, console]
----
Expand All @@ -79,7 +94,7 @@ cd ${CASSANDRA_HOME}/bin

After you have set the time series database to Newts and configured its settings, you must verify your setup and restart {page-component-title}:

. Verify keyspace initialization:
.Verify keyspace initialization:
+
[source, console]
----
Expand All @@ -88,7 +103,7 @@ describe table terms;
describe table samples;
----

. Restart {page-component-title} to apply your changes and verify your configuration:
.Restart {page-component-title} to apply your changes and verify your configuration:
+
[source, console]
systemctl restart opennms
Expand Down
2 changes: 2 additions & 0 deletions docs/modules/operation/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@
*** xref:deep-dive/kafka-producer/configure-kafka.adoc[]
*** xref:deep-dive/kafka-producer/shell-commands.adoc[]
** xref:deep-dive/grpc-exporter/grpc-exporter.adoc[]
** xref:deep-dive/alarm-correlation/situation-feedback.adoc[]
** xref:deep-dive/meta-data.adoc[]
** xref:deep-dive/search.adoc[]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
= Grpc Exporter
:description: Learn how the gRPC Exporter enables {page-component-title} to forward the status of monitored services to external applications.

The Grpc Exporter feature allows {page-component-title} to forward the status of all monitored services to external applications via the gRPC protocol.

These objects are encoded using link:https://developers.google.com/protocol-buffers/[Google Protocol Buffers (GPB)].
See `monitored-services.proto` in the corresponding source distribution for the model definitions.

== Configure gRPC Exporter

[source, karaf]
----
$ ssh -p 8101 admin@localhost
...
admin@opennms()> config:edit org.opennms.features.grpc.exporter
admin@opennms()> config:property-set host bsm.onmshs.local:1440 <1>
admin@opennms()> config:property-set tls.cert.path /opt/opennms/etc/tls.cert <2>
admin@opennms()> config:property-set tls.enabled false <3>
admin@opennms()> config:property-set snapshot.interval 3600 false <4>
admin@opennms()> config:update
----

<1> Set the hostname of the external gRPC application.
<2> Configure the path to the TLS certificate.
<3> TLS is enabled by default. For testing purposes, it can be disabled by setting this value to false.
<4> Set the interval (in seconds) at which the complete snapshot of services will be sent to the gRPC server.

== Enable gRPC Exporter

Install the `opennms-grpc-exporter` feature from the same shell using:

[source, karaf]
----
feature:install opennms-grpc-exporter
----

To ensure the feature is installed on subsequent restarts, add `opennms-grpc-exporter` to a file in featuresBoot.d:
[source, console]
----
echo "opennms-grpc-exporter" | sudo tee ${OPENNMS_HOME}/etc/featuresBoot.d/grpc-exporter.boot
----
17 changes: 17 additions & 0 deletions docs/modules/releasenotes/pages/changelog.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
[[release-33-changelog]]

= Changelog
[[releasenotes-changelog-33.1.2]]

== Release 33.1.2

Release 33.1.2 contains a bug fix and a new feature.

The codename for Horizon 33.1.2 is https://wikipedia.org/wiki/$$Cotinus$$[_Smoketree_].

=== Bug

* Update apache-commons-io (Issue https://issues.opennms.org/browse/NMS-16638[NMS-16638])
* File name field in System Reports is not working (Issue https://issues.opennms.org/browse/NMS-16983[NMS-16983])

=== Story

* Move grpc exporter to OpenNMS repository (Issue https://issues.opennms.org/browse/NMS-16991[NMS-16991])

[[releasenotes-changelog-33.1.1]]

== Release 33.1.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*******************************************************************************
* This file is part of OpenNMS(R).
*
* Copyright (C) 2024 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 1999-2024 The OpenNMS Group, Inc.
* Copyright (C) 2025 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 1999-2025 The OpenNMS Group, Inc.
*
* OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*******************************************************************************
* This file is part of OpenNMS(R).
*
* Copyright (C) 2016-2024 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 1999-2024 The OpenNMS Group, Inc.
* Copyright (C) 2016-2025 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 1999-2025 The OpenNMS Group, Inc.
*
* OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
*
Expand Down
Loading

0 comments on commit 35ce305

Please sign in to comment.