Giter Site home page Giter Site logo

it-novum / openitcockpit-agent-go Goto Github PK

View Code? Open in Web Editor NEW
4.0 7.0 1.0 5.13 MB

Cross-Platform Monitoring Agent for openITCOCKPIT written in Go

Home Page: https://openitcockpit.io/download_agent/

License: Apache License 2.0

Go 96.24% Dockerfile 0.07% Shell 2.95% Rich Text Format 0.73%
monitoring monitoring-agents hacktoberfest linux windows macos

openitcockpit-agent-go's People

Contributors

ibering avatar jabdr avatar nook24 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

rincewindshat

openitcockpit-agent-go's Issues

Wrong file permissions for TLS certs

Error:

UNKNOWN: cURL error 58: could not load PEM client certificate, OpenSSL error error:0200100D:system library:fopen:Permission denied, (no key found, wrong pass phrase, or wrong file format?) (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

Current permissions:

root@agent-test2:/opt/openitc/frontend# ls -la /opt/openitc/agent/
total 16
drwxr-xr-x  2 www-data www-data 4096 Mär 18 13:25 .
drwxr-xr-x 12 root     root     4096 Mär 18 12:01 ..
-rw-r-----  1 www-data www-data 3272 Mär 18 13:25 server_ca.key
-rw-r-----  1 www-data www-data 2086 Mär 18 13:25 server_ca.pem

Fix:

chown www-data:nagios /opt/openitc/agent/*

Windows: Windows Service

Der GO Agent muss noch die Win32 Service API implementiert bekommen, damit er wieder als Windows Services gestartet werden kann

Customchecks: threadpool

Der Threadpool für die Customchecks muss noch eingebaut werden.

Das reine Ausführen von Plugins/Kommandos ist bereits implementiert

Webserver: API Endpoints

Die API Entpunkte aus dem Python-Agenten müssen noch in den Webserver eingebaut werden. Genau wie das ausgeben vom json

Replace example configs

Die example config ist anscheinend noch die von Agent 1.x und muss durch die aktuelle Version ersetzt werden. Hier sollte die gleiche Config genutzt werden, wie die die oITC im Configgenerator erstellt.

customchecks kann einfach leer bleiben, dann braucht man kein string replace pro OS

Checks: Diskio

Die DiskIO Checks fehlen. Die Berechnungen können aus dem Python Agenten übernommen werden.

Checks: NetIO

Die NetIO checks fehlen. Die Berechnungen können aus dem Python Agenten übernommen werden

Disk usage check generates runtime error

Agent Mode:

  • [] Pull Model (openITCOCKPIT Server request data from Agent)
  • Push Model (Agent send data to openITCOCKPIT)

Versions

  • openITCOKPIT Server Version: 4.2.1
  • openITCOCKPIT Monitoring Agent Version: 3.0.2

Operating system
Debian 10 (buster), Kernel 5.3.18-2-pve (Proxmox 6.3-3)

  • Do you use an HTTP proxy? no
  • Are you using Auto-TLS, HTTPS or HTTP? https
  • Used CPU architecture: amd64

Describe the bug
On one of our Proxmox Clusters (8 nodes), the disk usage check produces an runtime error (on all nodes). On our other Proxmox clusters it works fine.

To Reproduce
Steps to reproduce the behavior:
?

Expected behavior
Check working without runtime error

Screenshots
grafik

Additional context
Debug output from the agent:

[...]
DEBU[1080] Begin Check:  agent
DEBU[1080] Finish Check:  agent
DEBU[1080] Begin Check:  swap
DEBU[1080] Finish Check:  swap
DEBU[1080] Begin Check:  users
DEBU[1080] Finish Check:  users
DEBU[1080] Begin Check:  disks
ERRO[1080] Check  disks : !!PANIC!!  runtime error: invalid memory address or nil pointer dereference
DEBU[1080] Finish Check:  disks
DEBU[1080] Begin Check:  disk_io
DEBU[1080] Finish Check:  disk_io
DEBU[1080] Begin Check:  system_load
DEBU[1080] Finish Check:  system_load
[...]

Fix systemd check

DEBU[0317] Begin Check:  sensors
DEBU[0317] Finish Check:  sensors
DEBU[0317] Begin Check:  docker
ERRO[0329] Could not finish executing integrated checks:  context deadline exceeded
ERRO[0329] Consider increasing check interval or disable unnecessary checks
DEBU[0329] FIXME: Got an status-code for which error does not match any expected type!!!: -1  module=api status_code=-1
DEBU[0329] Finish Check:  docker
DEBU[0329] Begin Check:  systemd_services
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xab71f3]

goroutine 408 [running]:
github.com/godbus/dbus/v5.(*outputHandler).close(0x0)
	/root/go/pkg/mod/github.com/godbus/dbus/[email protected]/conn.go:730 +0x33
github.com/godbus/dbus/v5.(*Conn).Close.func1()
	/root/go/pkg/mod/github.com/godbus/dbus/[email protected]/conn.go:284 +0x3a
sync.(*Once).doSlow(0xc0003c01e8, 0xc0004a0f90)
	/usr/lib/go-1.15/src/sync/once.go:66 +0xec
sync.(*Once).Do(...)
	/usr/lib/go-1.15/src/sync/once.go:57
github.com/godbus/dbus/v5.(*Conn).Close(0xc0003c01c0, 0x0, 0x0)
	/root/go/pkg/mod/github.com/godbus/dbus/[email protected]/conn.go:283 +0x78
github.com/godbus/dbus/v5.newConn.func1(0xc0003c01c0)
	/root/go/pkg/mod/github.com/godbus/dbus/[email protected]/conn.go:254 +0x59
created by github.com/godbus/dbus/v5.newConn
	/root/go/pkg/mod/github.com/godbus/dbus/[email protected]/conn.go:252 +0x138

Network IO gives wrong numbers on Windows 7 32 bit

On a Windows 7 32 bit, the Network IO gives wrong numbers like:

CRITICAL: Total average bytes critical! [LAN-Verbindung] Bandwidth: TX: 72.95TB/s / 597617.07Gbit/s RX: 75.95TB/s / 622188.8Gbit/s . Errors in/out per second: 0/0 Drop in/out per second: 0/0
CRITICAL: Total average bytes critical! [LAN-Verbindung] Bandwidth: TX: 61.37TB/s / 502765.87Gbit/s RX: 58.46TB/s / 478890.67Gbit/s . Errors in/out per second: 0/0 Drop in/out per second: 0/0
CRITICAL: Total average bytes critical! [LAN-Verbindung] Bandwidth: TX: 22.43TB/s / 183735.17Gbit/s RX: 17.09TB/s / 139970.21Gbit/s . Errors in/out per second: 0/0 Drop in/out per second: 0/0

It's unknown if this is a 32 bit issue or a Windows 7 issue

Checks: Netstats

Die Geschwindigkeit der Netzwerkkarte fehlt noch.
10, 100 1000Mbit/s usw

Config: BasicAuth

Aktuell wird auth = in der config ignoriert.
Der Wert username:password muss in das BasicAuth struct geladen werden

openITCOCKPIT Monitoring Agent 3.0 - Public Beta

openITCOCKPIT Monitoring Agent 3.0 - Public Beta

More information can be found in the this blog post:
https://openitcockpit.io/2021/2021/04/14/openitcockpit-monitoring-agent-3-0-public-beta/

Happy testing

At the moment version 3.x is in testing phase. To get best results we kindly ask you to join testing and to report any issues.

Please report all 3.x related issues to this issue.

Download

Please see the release notes for more information about what's changed.

Latest nightly release:

Build Status

Changelog

  • 3.0.1
    • openITCOCKPIT Monitoring Agent written in Go

News and Updates

This issue will be updated frequently. You can use the Subscribe button (on the right side) to get notifications about future updates.

Last update: Wed Apr 14 10:00:41 CEST 2021

Query event log through PowerShell

Get-EventLog -LogName Application -After (Get-Date).AddHours(-1)  | ConvertTo-Json -depth 100
Get-EventLog -LogName Application -After (Get-Date).AddHours(-1) | Select-Object Message, Source, TimeGenerated, TimeWritten, Index | ConvertTo-Json -depth 100

Alle Eventlogs übergeben

Wäre es möglich anstatt in die Config des Agents die jeweiligen Logs eintragen zu müssen, diese dynamisch zu übergeben

mit dem Befehler

Get-EventLog -LogName *
bekommt man alle windows eventlogs angegzeigt, hier übernebe ich dann die letzte Spalte, in der config ist drauf zu achten, dass Logs mit Leerzeichen mit einem Hochkomma einzutragen sind.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.