opni

module
v0.6.0-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2022 License: Apache-2.0

README ยถ

Opni = AIOps for Kubernetes + Observability Tools

Opni currently features log anomaly detection for Kubernetes.

What does Opni give me?
  • AI generated insights on your cluster's log messages
    • Control Plane & etcd insights
      • Pretrained models maintained by Rancher Labs
  • Every log message sent to Opni will be marked as:
    • Normal
    • Suspicious - Operators may want to investigate
    • Anomalous - Operators definitely should investigate
  • Opensearch + Opensearch Dashboards
    • Opni dashboard to consume log insights & explore logs

alt text


Deprecation Notice
  • GPU Learning is temporarily disabled in the v0.4.0 release as Opni moves to a multicluster architecture. This will be returning in a future release
  • The v1beta1 API has been deprecated in this release. Please migrate to v1beta2.
  • The UI and Insights services, which were experimental, have been removed

Getting started with Opni

Full Install Opni in your Kubernetes cluster:

Prerequisites:

  • Cert manager installed. This can be installed with the following command:
    kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.7.2/cert-manager.yaml
    
  • Opni Gateway installed - see the Main Cluster docs for Opni Monitoring

Installation:

  1. All clusters (both the main cluster and clusters to collect logs from) the manifests in deploy/manifests in order from 00 - 10.
  2. Deploy an Opensearch cluster e.g (node this cluster will need to be exposed via a LoadBalancer or Ingress to allow logs to be indexed)
    apiVersion: opensearch.opster.io/v1
    kind: OpenSearchCluster
    metadata:
      name: opni
      namespace: opni-cluster-system
    spec:
      # Add fields here
      general:
        httpPort: 9200
        vendor: opensearch
        version: 1.2.3
        serviceName: os-svc
        setVMMaxMapCount: true
      confMgmt:
        autoScaler: false
        monitoring: false
      dashboards:
        enable: true
        version: 1.2.0
        replicas: 1
      nodePools:
      - component: master
        replicas: 3
        diskSize: 32
        resources:
          requests:
            cpu: 500m
            memory: 1Gi
          limits:
            memory: 1Gi
        roles:
        - master
        persistence:
          emptyDir: {}
      - component: nodes
        replicas: 2
        diskSize: 32
        resources:
          requests:
            cpu: 500m
            memory: 2Gi
          limits:
            memory: 2Gi
        jvm: "-Xmx1G -Xms1G"
        roles:
        - data
        persistence:
          emptyDir: {}
    
  3. Bind Opni to the Opensearch cluster:
    apiVersion: opni.io/v1beta2
    kind: MulticlusterRoleBinding
    metadata:
      name: opni-logging
      namespace: opni-cluster-system
    spec:
      opensearch:
        name: opni
        namespace: opni-cluster-system
      opensearchExternalURL: https://external.opensearch.url
    
  4. Deploy the Opni pretrained Kubernetes model
    apiVersion: opni.io/v1beta2
    kind: PretrainedModel
    metadata:
      name: control-plane
      namespace: opni-cluster-system
    spec:
      source:
        http:
          url: "https://opni-public.s3.us-east-2.amazonaws.com/pretrain-models/control-plane-model-v0.4.0.zip"
      hyperparameters:
        modelThreshold: "0.6"
        minLogTokens: 1
        isControlPlane: "true"
    
  5. Deploy Opni AI services
    apiVersion: opni.io/v1beta2
    kind: OpniCluster
    metadata:
      name: demo
      namespace: opni-cluster-system
    spec:
      version: v0.4.0
      deployLogCollector: false
      services:
        gpuController:
          enabled: false
        inference:
          pretrainedModels:
          - name: control-plane
      opensearch:
        externalOpensearch:
          name: opni
          namespace: opni-cluster-system
        enableLogIndexManagement: false
      s3:
        internal: {}
      nats:
        authMethod: nkey
    
  6. Add additional Logging clusters from the Opni Gateway UI

Consume insights from the Opni Dashboard in Opensearch Dashboards. You will need to expose the Dashboards service or port forward to do this.


Watch a demo of Opni:


What's next?
  • v0.1.1 (Released) allows you to view Opni's log anomaly insights only on a demo environment created on a VM
  • v0.1.2 (Released) allows you install Opni into your existing Kubernetes cluster and consume log insights from it
  • v0.1.3 (August 2021) - only 1 GPU required, changes to the Opni operator, log anomaly optimizations
  • v0.2.0 (Fall 2021) will introduce a custom UI, AI applied to metrics, kubernetes events, audit logs, and more!

alt text


License

Copyright (c) 2014-2020 Rancher Labs, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Build codecov Go Report Card Maintainability


Opni Monitoring is an open-source multi-cluster monitoring system. It ingests Prometheus metrics from any number of Kubernetes clusters and provides a centralized observability plane for your infrastructure. Use Opni Monitoring to visualize metrics from all your clusters at once, and give every user their own customized view using granular access control.

โšก Powered by Open-Source

Opni Monitoring is completely free Apache-licensed open-source software. It builds upon existing, ubiquitous open-source systems - Prometheus, Grafana, and Cortex - and extends them with a number of powerful enterprise features typically only found in SaaS platforms and other proprietery solutions.

๐Ÿ”‹ Batteries Included

Opni Monitoring comes out of the box with all the tools you need to get started with multi-cluster monitoring. Manage your clusters and configure access control rules with the built-in dashboard, command-line interface, or REST API.

Opni Monitoring is secure-by-default and uses a zero-trust architecture for inter-cluster communication, with no extra setup required.

๐Ÿ”’ You Own Your Data

With Opni Monitoring, you have complete control over how and where your data is stored. Metric storage is powered by Cortex, which provides comprehensive configuration options for data storage and retention. Several storage backends are available including S3 (cloud or self-hosted), Swift, and Kubernetes Persistent Volumes.

Get started

Check out the Opni Monitoring Documentation for installation guides and more.

Directories ยถ

Path Synopsis
ai/v1beta1
+kubebuilder:object:generate=true +groupName=ai.opni.io
+kubebuilder:object:generate=true +groupName=ai.opni.io
core/v1beta1
+kubebuilder:object:generate=true +groupName=core.opni.io
+kubebuilder:object:generate=true +groupName=core.opni.io
grafana/v1alpha1
+kubebuilder:object:generate=true +groupName=nfd.opni.io
+kubebuilder:object:generate=true +groupName=nfd.opni.io
logging/v1beta1
+kubebuilder:object:generate=true +groupName=logging.opni.io
+kubebuilder:object:generate=true +groupName=logging.opni.io
monitoring/v1beta1
+kubebuilder:object:generate=true +groupName=monitoring.opni.io
+kubebuilder:object:generate=true +groupName=monitoring.opni.io
nfd/v1
+kubebuilder:object:generate=true +groupName=nfd.opni.io
+kubebuilder:object:generate=true +groupName=nfd.opni.io
nvidia/v1
+kubebuilder:object:generate=true +groupName=nvidia.opni.io
+kubebuilder:object:generate=true +groupName=nvidia.opni.io
v1beta2
+kubebuilder:validation:Optional
+kubebuilder:validation:Optional
cmd
dagger module
images
internal
pkg
alerting/metrics
Building promethues / cortex alerting rules
Building promethues / cortex alerting rules
alerting/noop
Module implements a noop alerting model, in case the alerting plugin is not loaded
Module implements a noop alerting model, in case the alerting plugin is not loaded
alerting/shared
Shared definitions (constants & errors) for opni alerting
Shared definitions (constants & errors) for opni alerting
apis/alerting/v1alpha
Package v1alpha is a reverse proxy.
Package v1alpha is a reverse proxy.
apis/management/v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.
bootstrap
Package bootstrap contains logic for securely adding new clusters to the gateway using bootstrap tokens.
Package bootstrap contains logic for securely adding new clusters to the gateway using bootstrap tokens.
config/v1beta1
This package defines the configuration for the Opni Monitoring gateway and agent.
This package defines the configuration for the Opni Monitoring gateway and agent.
machinery
Package machinery contains general-purpose utilities used for integrating functionality between multiple packages.
Package machinery contains general-purpose utilities used for integrating functionality between multiple packages.
pkp
plugins/apis
Package apis can be imported to ensure all plugin APIs are added to client schemes.
Package apis can be imported to ensure all plugin APIs are added to client schemes.
plugins/hooks
Package hooks contains interfaces used to invoke callbacks at specific points during the plugin loading process.
Package hooks contains interfaces used to invoke callbacks at specific points during the plugin loading process.
providers
Package providers provides methods to detect different Kubernetes distros.
Package providers provides methods to detect different Kubernetes distros.
slo/query
Module for defining collectors and their good/bad events API.
Module for defining collectors and their good/bad events API.
storage/etcd
Package etcd implements data storage using etcd.
Package etcd implements data storage using etcd.
test/mock/apiextensions
Package mock_apiextensions is a generated GoMock package.
Package mock_apiextensions is a generated GoMock package.
test/mock/capability
Package mock_v1 is a generated GoMock package.
Package mock_v1 is a generated GoMock package.
test/mock/ext
Package mock_ext is a generated GoMock package.
Package mock_ext is a generated GoMock package.
test/mock/ident
Package mock_ident is a generated GoMock package.
Package mock_ident is a generated GoMock package.
test/mock/notifier
Package mock_notifier is a generated GoMock package.
Package mock_notifier is a generated GoMock package.
test/mock/rbac
Package mock_rbac is a generated GoMock package.
Package mock_rbac is a generated GoMock package.
test/mock/rules
Package mock_rules is a generated GoMock package.
Package mock_rules is a generated GoMock package.
test/mock/storage
Package mock_storage is a generated GoMock package.
Package mock_storage is a generated GoMock package.
util/notifier
Package for abstracting agent downstream updates and notifying upstream
Package for abstracting agent downstream updates and notifying upstream
plugins
alerting/pkg/alerting
- Functions that handle each endpoint implementation update case - Functions that handle each alert condition case
- Functions that handle each endpoint implementation update case - Functions that handle each alert condition case
example/pkg/example
Package example is a reverse proxy.
Package example is a reverse proxy.
logging/pkg/apis/loggingadmin
Package loggingadmin is a reverse proxy.
Package loggingadmin is a reverse proxy.
metrics/pkg/apis/cortexadmin
Package cortexadmin is a reverse proxy.
Package cortexadmin is a reverse proxy.
metrics/pkg/apis/cortexops
Package cortexops is a reverse proxy.
Package cortexops is a reverse proxy.
slo
slo/pkg/apis/slo
Package slo is a reverse proxy.
Package slo is a reverse proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL