ncpa 3.0.0 not handling duplicate entries in configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
CBoekhuis
Posts: 214
Joined: Tue Aug 16, 2011 4:55 am

ncpa 3.0.0 not handling duplicate entries in configuration

Post by CBoekhuis »

Hello,

today we installed ncpa-3.0.0-latest.x86_64 on our nagiosxi server ( test environment Red Hat Enterprise Linux release 8.9 (Ootpa)).

We got error messages from systemd:

nagiosxi_test:root:/root> systemctl status ncpa
● ncpa.service - NCPA
Loaded: loaded (/usr/lib/systemd/system/ncpa.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2023-11-16 11:55:57 CET; 7s ago
Docs: https://www.nagios.org/ncpa
Process: 16830 ExecStart=/usr/local/ncpa/ncpa -n (code=exited, status=255)
Main PID: 16830 (code=exited, status=255)

Nov 16 11:55:57 nagiosxi_test ncpa[16830]: File "console.py", line 16, in run
Nov 16 11:55:57 nagiosxi_test ncpa[16830]: File "ncpa.py", line 1111, in <module>
Nov 16 11:55:57 nagiosxi_test ncpa[16830]: File "ncpa.py", line 1045, in main
Nov 16 11:55:57 nagiosxi_test ncpa[16830]: File "ncpa.py", line 894, in get_configuration
Nov 16 11:55:57 nagiosxi_test ncpa[16830]: File "configparser.py", line 713, in read
Nov 16 11:55:57 nagiosxi_test ncpa[16830]: File "configparser.py", line 1112, in _read
Nov 16 11:55:57 nagiosxi_test ncpa[16830]: configparser.DuplicateOptionError: While reading from '/usr/local/ncpa/etc/ncpa.cfg' [line 375]: option '.sh' in secti>
Nov 16 11:55:57 nagiosxi_test ncpa[16830]: ***** Starting NCPA version: 3.0.0
Nov 16 11:55:57 nagiosxi_test systemd[1]: ncpa.service: Main process exited, code=exited, status=255/n/a
Nov 16 11:55:57 nagiosxi_test systemd[1]: ncpa.service: Failed with result 'exit-code'.

After looking at the file we see the following :

# Linux / Mac OS X
.sh = /bin/sh $plugin_name $plugin_args
.py = python3 $plugin_name $plugin_args
.pl = perl $plugin_name $plugin_args
.php = php $plugin_name $plugin_args

# Windows
.ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name $plugin_args
.vbs = cscript $plugin_name $plugin_args //NoLogo
.wsf = cscript $plugin_name $plugin_args //NoLogo
.bat = cmd /c $plugin_name $plugin_args
.sh = /bin/bash $plugin_name $plugin_args

I managed to start the ncpa service by moving the .sh line in the windows section to the Linux and deleting the line in de Linux section.

Question to you is : is this correct? And why is this not corrected by the installer.

Mean while we have stopped enrolment of the new release.

With kind regards,

Christian
User avatar
jmichaelson
Posts: 117
Joined: Wed Aug 23, 2023 1:02 pm

Re: ncpa 3.0.0 service not starting

Post by jmichaelson »

Christian, I have a hunch that the answer is that it isn't correct.

Please file an issue in the NCPA GitHub repository here: https://github.com/NagiosEnterprises/ncpa
Please let us know if you have any other questions or concerns.

-Jason
bbahn
Posts: 112
Joined: Thu Jan 12, 2023 5:42 pm

Re: ncpa 3.0.0 service not starting

Post by bbahn »

It seems that this is an issue of having duplicate entries in the plugin extensions. If you'd like, I can create an issue to allow NCPA to handle duplicate file extensions. The configuration does not ship in that state however and it's not intended to have duplicates in the configuration. Please respond here with @bbahn if you would like me to handle this.
April: Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
CBoekhuis
Posts: 214
Joined: Tue Aug 16, 2011 4:55 am

Re: ncpa 3.0.0 service not starting

Post by CBoekhuis »

I have post an issue on github.
SageKilback
Posts: 2
Joined: Tue Oct 31, 2023 4:05 am

Re: ncpa 3.0.0 service not starting

Post by SageKilback »

CBoekhuis wrote: Thu Nov 23, 2023 8:53 am I have post an issue on github.geometry dash 23
Can you share that link?
bekean23
Posts: 7
Joined: Sat Jul 01, 2023 11:39 pm

Re: ncpa 3.0.0 service not starting

Post by bekean23 »

Thanks for sharing!
LoriaShideler
Posts: 1
Joined: Wed Jan 31, 2024 12:22 am

Re: ncpa 3.0.0 service not starting

Post by LoriaShideler »

Thank you very much for providing
Post Reply