Problems with configuring Icinga for Kubernetes

Hi folks,

I’m stuck in a rabbit hole since a few hours. I’m using a AKS Cubernetes Cluster and want to monitor it via the Module Icinga for Kubernetes. I installed the packages via apt-install as written in the documentation.

I made a empty database that is on my localhost and accessible.

I made a configuration file for my database (I checked that the database is accessible):
config.yml:

# This is the configuration file for Icinga for Kubernetes.

# Connection configuration for the database to which Icinga for Kubernetes synchronizes data.
# This is also the database used in Icinga for Kubernetes Web to view and work with the data.
database:
  # Database type. Only 'mysql' is supported yet which is the default.
#  type: mysql

  # Database host or absolute Unix socket path.
  host: localhost

  # Database port. By default, the MySQL port.
#  port:

  # Database name.
  database: kubernetes

  # Database user.
  user: kubernetes

  # Database password.
  password: test

Where I’m stuck since a few hours now is the start of the service.
If I run systemctl enable --now icinga-kubernetes I get the following error:

Jul 25 10:58:12 dev-icinga2 systemd[1]: icinga-kubernetes.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

× icinga-kubernetes.service - Icinga for Kubernetes
     Loaded: loaded (/etc/systemd/system/icinga-kubernetes.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/icinga-kubernetes.service.d
             └─env.conf
     Active: failed (Result: exit-code) since Thu 2024-07-25 10:58:12 UTC; 3s ago
    Process: 249820 ExecStart=/usr/sbin/icinga-kubernetes --config /etc/icinga-kubernetes/config.yml (code=exited, status=2)
   Main PID: 249820 (code=exited, status=2)
        CPU: 655ms

Jul 25 10:58:12 dev-icinga2 icinga-kubernetes[249820]:         github.com/icinga/icinga-kubernetes/pkg/sync/controller.go:55 +0x369
Jul 25 10:58:12 dev-icinga2 icinga-kubernetes[249820]: github.com/icinga/icinga-kubernetes/pkg/sync/v1.(*Sync).sync.func3()
Jul 25 10:58:12 dev-icinga2 icinga-kubernetes[249820]:         github.com/icinga/icinga-kubernetes/pkg/sync/v1/sync.go:98 +0x46
Jul 25 10:58:12 dev-icinga2 icinga-kubernetes[249820]: golang.org/x/sync/errgroup.(*Group).Go.func1()
Jul 25 10:58:12 dev-icinga2 icinga-kubernetes[249820]:         golang.org/x/sync@v0.6.0/errgroup/errgroup.go:78 +0x56
Jul 25 10:58:12 dev-icinga2 icinga-kubernetes[249820]: created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 6
Jul 25 10:58:12 dev-icinga2 icinga-kubernetes[249820]:         golang.org/x/sync@v0.6.0/errgroup/errgroup.go:75 +0x96
Jul 25 10:58:12 dev-icinga2 systemd[1]: icinga-kubernetes.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 25 10:58:12 dev-icinga2 systemd[1]: icinga-kubernetes.service: Failed with result 'exit-code'.
Jul 25 10:58:12 dev-icinga2 systemd[1]: Failed to start Icinga for Kubernetes.
root@dev-icinga2:/etc/icinga-kubernetes# 

It dosen’t matter if I try it with or without password, with another or empty config file. I tried various versions. Only with a wron password it says me (what it shoud do, that the connection could not be made. I don’t get any error about an INVALIDARGUMENT then. Can anyone tell me what the problem is with the arguments (that I pasted from the example config file)?

My other enviroment variables are stored here:
etc/systemd/system/icinga-kubernetes.service:

[Unit]
Description=Icinga for Kubernetes
After=syslog.target network-online.target mariadb.service postgresql.service

[Service]
Type=notify
User=icinga-kubernetes
Environment="KUBECONFIG=/etc/kubernetes/kubeconfig/kubeconfig-icinga.yaml"
Environment="KUBERNETES_MASTER=https://path-to-my-aks-cluster.hcp.westeurope.azmk8s.io:443"
#ExecStartPre=/bin/sh -c 'echo "KUBECONFIG=$KUBECONFIG" >> /tmp/icinga-kubernetes-env.log'
#ExecStartPre=/bin/sh -c 'ls -l /etc/kubernetes/kubeconfig/kubeconfig-icinga.yaml >> /tmp/icinga-kubernetes-env.log'
ExecStart=/usr/sbin/icinga-kubernetes --config /etc/icinga-kubernetes/config.yml
#ExecStartPost=/bin/sh -c 'cat /tmp/icinga-kubernetes-env.log'

[Install]
WantedBy=multi-user.target

If you need any further informations, please let me know.

Kind regards

Tobias

1 Like

did you import the sql schema?

mysql kubernetes < /usr/share/icinga-kubernetes/schema/mysql/schema.sql

also keep in mind that this is not yet production ready.

1 Like

Thanks for trying out Icinga for Kubernetes. Please keep in mind that this is still an early version.

Your systemctl status command showed the tail of an error. Could you please provide the full error and log messages above it. Those might provide to be useful.

Hi,

sorry about my late answer, I was on leave for vacation last week.

I tryed to import it again (also I was sure that I did this):

root@dev-icinga2:~# mysql kubernetes < /usr/share/icinga-kubernetes/schema/mysql/schema.sql
ERROR 1050 (42S01) at line 1: Table 'namespace' already exists
root@dev-icinga2:~# 

The error is posted here:

root@dev-icinga2:~# systemctl restart icinga-kubernetes
Job for icinga-kubernetes.service failed because the control process exited with error code.
See "systemctl status icinga-kubernetes.service" and "journalctl -xeu icinga-kubernetes.service" for details.
root@dev-icinga2:~# systemctl status icinga-kubernetes.service
× icinga-kubernetes.service - Icinga for Kubernetes
     Loaded: loaded (/etc/systemd/system/icinga-kubernetes.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/icinga-kubernetes.service.d
             └─env.conf
     Active: failed (Result: exit-code) since Wed 2024-08-07 05:21:30 UTC; 14s ago
    Process: 680610 ExecStart=/usr/sbin/icinga-kubernetes --config /etc/icinga-kubernetes/config.yml (code=exited, status=2)
   Main PID: 680610 (code=exited, status=2)
        CPU: 829ms

Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/controller.go:55 +0x369
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync/v1.(*Sync).sync.func3()
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/v1/sync.go:98 +0x46
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: golang.org/x/sync/errgroup.(*Group).Go.func1()
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         golang.org/x/sync@v0.6.0/errgroup/errgroup.go:78 +0x56
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 25
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         golang.org/x/sync@v0.6.0/errgroup/errgroup.go:75 +0x96
Aug 07 05:21:30 dev-icinga2 systemd[1]: icinga-kubernetes.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 07 05:21:30 dev-icinga2 systemd[1]: icinga-kubernetes.service: Failed with result 'exit-code'.
Aug 07 05:21:30 dev-icinga2 systemd[1]: Failed to start Icinga for Kubernetes.
root@dev-icinga2:~# journalctl -xeu icinga-kubernetes.service
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/sink.go:59 +0x38
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync.(*Controller).stream(0xc00042c640, {0x1d2cc10, 0xc000418690}, >
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/controller.go:93 +0x468
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync.(*Controller).Stream(0xc00042c640, {0x1d2cc10, 0xc000418690}, >
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/controller.go:55 +0x369
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync/v1.(*Sync).sync.func3()
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/v1/sync.go:98 +0x46
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: golang.org/x/sync/errgroup.(*Group).Go.func1()
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         golang.org/x/sync@v0.6.0/errgroup/errgroup.go:78 +0x56
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 25
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         golang.org/x/sync@v0.6.0/errgroup/errgroup.go:75 +0x96
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: panic: failed to parse CIDR : invalid CIDR address:  [recovered]
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         panic: failed to parse CIDR : invalid CIDR address:
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: goroutine 496 [running]:
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc0000cb880?})
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         k8s.io/apimachinery@v0.29.2/pkg/util/runtime/runtime.go:56 +0xcd
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: panic({0x18ed6c0?, 0xc00221b050?})
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         runtime/panic.go:770 +0x132
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/schema/v1.(*Node).Obtain(0xc000481320, {0x1d41d38, 0xc00024e008})
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/schema/v1/node.go:67 +0x11f9
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync/v1.(*Sync).sync.func1(0xc003e76d40)
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/v1/sync.go:85 +0x4f
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync.(*Sink).Upsert(0x2a443b0?, {0x1d2cc10, 0xc000418690}, 0xc000c5>
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/sink.go:59 +0x38
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync.(*Controller).stream(0xc00042c640, {0x1d2cc10, 0xc000418690}, >
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/controller.go:93 +0x468
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync.(*Controller).Stream(0xc00042c640, {0x1d2cc10, 0xc000418690}, >
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/controller.go:55 +0x369
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync/v1.(*Sync).sync.func3()
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/v1/sync.go:98 +0x46
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: golang.org/x/sync/errgroup.(*Group).Go.func1()
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         golang.org/x/sync@v0.6.0/errgroup/errgroup.go:78 +0x56
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]: created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 25
Aug 07 05:21:30 dev-icinga2 icinga-kubernetes[680610]:         golang.org/x/sync@v0.6.0/errgroup/errgroup.go:75 +0x96
Aug 07 05:21:30 dev-icinga2 systemd[1]: icinga-kubernetes.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ An ExecStart= process belonging to unit icinga-kubernetes.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 2.
Aug 07 05:21:30 dev-icinga2 systemd[1]: icinga-kubernetes.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ The unit icinga-kubernetes.service has entered the 'failed' state with result 'exit-code'.
Aug 07 05:21:30 dev-icinga2 systemd[1]: Failed to start Icinga for Kubernetes.
░░ Subject: A start job for unit icinga-kubernetes.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A start job for unit icinga-kubernetes.service has finished with a failure.
░░ 
░░ The job identifier is 123791 and the job result is failed.

My guess is, that maybe there is some error in the code, as I get an Invalid argument error for my config file.

But what I saw today is the following: Even the service isn’t running properly, I can have a look at my pv’s:

I do not now how this is woking, but I can only see them. Pods, Secrets, pV-Claims … are not visible. Kind of strange, but it was for testing purpose only. Maybe I have to wait for further versions. But I would really like to use this module as I would be great to have the opportunity to monitor k8s that way.

Has any one of you got this module working? What would be interessting is, if this error is because of my setup, or if everyone else has this problems.

Thanks for your help.

Regards

Tobias

Thanks for your response. However, your journalctl output does not
contain the whole stack trace. Could you please report the full error,
by inspecting the tail of journalctl -u icinga-kubernetes.service
until the error and the stack trace starts.

The output should be wrong or at least outdated, as the service is not
running.

Hi, thanks fpr your reply. Here are the requested logs. :slight_smile:

Aug 07 07:21:30 dev-icinga2 systemd[1]: Starting Icinga for Kubernetes...
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: I0807 05:21:30.333904  680610 database.go:285] "Connecting to database" logger="database"
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: E0807 05:21:30.761120  680610 runtime.go:79] Observed a panic: failed to parse CIDR : invalid CIDR address:  (failed to parse CIDR : invalid CIDR : invalid CIDR address: )
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: goroutine 496 [running]:
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: k8s.io/apimachinery/pkg/util/runtime.logPanic({0x18ed6c0, 0xc00221b050})
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         k8s.io/apimachinery@v0.29.2/pkg/util/runtime/runtime.go:75 +0x85
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc0000cb880?})
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         k8s.io/apimachinery@v0.29.2/pkg/util/runtime/runtime.go:49 +0x6b
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: panic({0x18ed6c0?, 0xc00221b050?})
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         runtime/panic.go:770 +0x132
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/schema/v1.(*Node).Obtain(0xc000481320, {0x1d41d38, 0xc00024e008})
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/schema/v1/node.go:67 +0x11f9
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync/v1.(*Sync).sync.func1(0xc003e76d40)
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/v1/sync.go:85 +0x4f
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync.(*Sink).Upsert(0x2a443b0?, {0x1d2cc10, 0xc000418690}, 0xc000c52e18?)
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/sink.go:59 +0x38
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync.(*Controller).stream(0xc00042c640, {0x1d2cc10, 0xc000418690}, 0xc000113bf0)
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/controller.go:93 +0x468
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync.(*Controller).Stream(0xc00042c640, {0x1d2cc10, 0xc000418690}, 0xc000113bf0)
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/controller.go:55 +0x369
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync/v1.(*Sync).sync.func3()
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/v1/sync.go:98 +0x46
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: golang.org/x/sync/errgroup.(*Group).Go.func1()
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         golang.org/x/sync@v0.6.0/errgroup/errgroup.go:78 +0x56
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 25
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         golang.org/x/sync@v0.6.0/errgroup/errgroup.go:75 +0x96
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: panic: failed to parse CIDR : invalid CIDR address:  [recovered]
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         panic: failed to parse CIDR : invalid CIDR address:
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: goroutine 496 [running]:
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc0000cb880?})
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         k8s.io/apimachinery@v0.29.2/pkg/util/runtime/runtime.go:56 +0xcd
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: panic({0x18ed6c0?, 0xc00221b050?})
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         runtime/panic.go:770 +0x132
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/schema/v1.(*Node).Obtain(0xc000481320, {0x1d41d38, 0xc00024e008})
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/schema/v1/node.go:67 +0x11f9
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync/v1.(*Sync).sync.func1(0xc003e76d40)
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/v1/sync.go:85 +0x4f
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync.(*Sink).Upsert(0x2a443b0?, {0x1d2cc10, 0xc000418690}, 0xc000c52e18?)
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/sink.go:59 +0x38
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync.(*Controller).stream(0xc00042c640, {0x1d2cc10, 0xc000418690}, 0xc000113bf0)
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/controller.go:93 +0x468
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync.(*Controller).Stream(0xc00042c640, {0x1d2cc10, 0xc000418690}, 0xc000113bf0)
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/controller.go:55 +0x369
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: github.com/icinga/icinga-kubernetes/pkg/sync/v1.(*Sync).sync.func3()
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         github.com/icinga/icinga-kubernetes/pkg/sync/v1/sync.go:98 +0x46
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: golang.org/x/sync/errgroup.(*Group).Go.func1()
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         golang.org/x/sync@v0.6.0/errgroup/errgroup.go:78 +0x56
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]: created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 25
Aug 07 07:21:30 dev-icinga2 icinga-kubernetes[680610]:         golang.org/x/sync@v0.6.0/errgroup/errgroup.go:75 +0x96
Aug 07 07:21:30 dev-icinga2 systemd[1]: icinga-kubernetes.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 07 07:21:30 dev-icinga2 systemd[1]: icinga-kubernetes.service: Failed with result 'exit-code'.
Aug 07 07:21:30 dev-icinga2 systemd[1]: Failed to start Icinga for Kubernetes.

Thanks for the logs. The full stack trace helps a bit.

The bit repetitive error Observed a panic: failed to parse CIDR : invalid CIDR address: (failed to parse CIDR : invalid CIDR : invalid CIDR address: ) originates in https://github.com/Icinga/icinga-kubernetes/blob/v0.1.0/pkg/schema/v1/node.go#L67. I am not familiar with icinga-kubernetes, but the raised panic seems like an assertion that each K8s node needs an assigned IP address range for pods, https://pkg.go.dev/k8s.io/api/core/v1#NodeSpec.

I just compared the release code with the latest development version, and this issue seems to be fixed in the main branch: https://github.com/Icinga/icinga-kubernetes/blob/d34b35c92efb91052059315eaee5907a49fa3137/pkg/schema/v1/node.go#L88-L94. Thus, you can either build yourself the latest version or wait for a new release to be drafted.

Hi Tobias,

The issues mentioned have all been fixed since the release of version 0.1.0. Unfortunately there is no new release yet, but there will be soon. In the meantime, please switch to snapshot packages. Note that you will need to configure a different repo, e.g. ICINGA-snapshot. Please check packages.icinga.com for instructions for the operating system you are using.

Best regards,
Eric

1 Like

Hi,

thanks for all your help. I will try it this week and keep you updated. Also I’m awaiting for the new release update. :slight_smile:

regards

Tobias

Hi folks, just wanted to inform everyone else. I tried with version 0.2.0 that was released some time ago and everything worked as expected. I got it working. Thanks for your help and for investigating the issue.

regards

Tobias

2 Likes