error starting ncpa_passive

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ctretelea
Posts: 59
Joined: Fri Feb 17, 2017 5:43 pm

error starting ncpa_passive

Post by ctretelea »

Hi I trying to start ncpa_passive mode in centos 7. It's says status ok but doesn't send any stats. When I look at the system logs I found this:
Jan 29 22:27:54 ip-172-31-10-146 systemd: Stopping LSB: This manages the NCPA Passive service...
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: Stopping NCPA Passive: ERROR:root:File contains no section headers.
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: file: /usr/local/ncpa/etc/ncpa.cfg.d/example.cfg, line: 7
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: '%HOSTNAME%|__HOST__ = system/agent_version\n'
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: Traceback (most recent call last):
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: File "ncpa_passive.py", line 88, in <module>
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: File "/root/ncpa/agent/ncpadaemon.py", line 74, in main
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: File "/root/ncpa/agent/ncpadaemon.py", line 123, in read_basic_config
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: File "/usr/local/lib/python2.7/ConfigParser.py", line 305, in read
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: File "/usr/local/lib/python2.7/ConfigParser.py", line 512, in _read
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: MissingSectionHeaderError: File contains no section headers.
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: file: /usr/local/ncpa/etc/ncpa.cfg.d/example.cfg, line: 7
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: '%HOSTNAME%|__HOST__ = system/agent_version\n'
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: [ OK ]
Jan 29 22:27:54 ip-172-31-10-146 systemd: Starting LSB: This manages the NCPA Passive service...
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: Starting NCPA Passive: ERROR:root:File contains no section headers.
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: file: /usr/local/ncpa/etc/ncpa.cfg.d/example.cfg, line: 7
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: '%HOSTNAME%|__HOST__ = system/agent_version\n'
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: Traceback (most recent call last):
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: File "ncpa_passive.py", line 88, in <module>
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: File "/root/ncpa/agent/ncpadaemon.py", line 74, in main
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: File "/root/ncpa/agent/ncpadaemon.py", line 123, in read_basic_config
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: File "/usr/local/lib/python2.7/ConfigParser.py", line 305, in read
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: File "/usr/local/lib/python2.7/ConfigParser.py", line 512, in _read
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: MissingSectionHeaderError: File contains no section headers.
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: file: /usr/local/ncpa/etc/ncpa.cfg.d/example.cfg, line: 7
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: '%HOSTNAME%|__HOST__ = system/agent_version\n'
Jan 29 22:27:54 ip-172-31-10-146 ncpa_passive: [ OK ]
Jan 29 22:27:54 ip-172-31-10-146 systemd: Started LSB: This manages the NCPA Passive service.
"

Can someone help me why I cannot run passive mode?

Thanks,
kyang

Re: error starting ncpa_passive

Post by kyang »

What version of NCPA do you have? What Linux version and XI version?

How about the version of Python?

Code: Select all

python -V
Could you send me your example.cfg and your ncpa.cfg file?

Code: Select all

/usr/local/ncpa/etc/ncpa.cfg
/usr/local/ncpa/etc/ncpa.cfg.d/example.cfg
Thanks!
ctretelea
Posts: 59
Joined: Fri Feb 17, 2017 5:43 pm

Re: error starting ncpa_passive

Post by ctretelea »

Hi kyang,

Here are the system an python version.
[root@ip]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
[root@ip]# python -V
Python 2.7.5
[root@ip]# rpm -qa | grep ncpa
ncpa-2.1.1-1.el7.centos.x86_64


I attached those 2 files (I removed the the token and server address from )

Thanks,
You do not have the required permissions to view the files attached to this post.
kyang

Re: error starting ncpa_passive

Post by kyang »

In your ncpa.cfg file.

You have handlers set to none in your ncpa.cfg file.

Code: Select all

[passive]
handlers = None
You should specify in here that you are using nrdp.

Code: Select all

[passive]
handlers = nrdp
Then save, and restart the ncpa_passive

Code: Select all

service ncpa_passive restart
That's all that I can see, but if it doesn't work let me us know!
Locked