Nagios check_tcp not showing correct status on UI

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
pnikhade
Posts: 12
Joined: Thu Jul 27, 2023 10:23 am

Re: Nagios check_tcp not showing correct status on UI

Post by pnikhade »

If I do not use that as a part of the syntax, it will throw syntax error.
kg2857
Posts: 490
Joined: Wed Apr 12, 2023 5:48 pm

Re: Nagios check_tcp not showing correct status on UI

Post by kg2857 »

What syntax error? If there's a syntax error there's an issue with the command, service, etc.
Using nrpe means the check_tcp command will run on the remote host, which I doubt is what is wanted. You have to ask yourself where you want check_tcp to run. To me it makes more sense to run from the nagios host.
I think you can combine all the services using check_tcp into one check_tcp command and just use check_tcp. It looks like you're making this harder than it needs to be. There should be a check_tcp command.
pnikhade
Posts: 12
Joined: Thu Jul 27, 2023 10:23 am

Re: Nagios check_tcp not showing correct status on UI

Post by pnikhade »

No, it gives a syntax error. See, like below. I am a bit confused on how I can monitor these ports using a single command ? Any documentation got this ?
Jun 23 10:39:32 nagios-core nagios[2654]: Nagios Core 4.4.6
Jun 23 10:39:32 nagios-core nagios[2654]: Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Jun 23 10:39:32 nagios-core nagios[2654]: Copyright (c) 1999-2009 Ethan Galstad
Jun 23 10:39:32 nagios-core nagios[2654]: Last Modified: 2020-04-28
Jun 23 10:39:32 nagios-core nagios[2654]: License: GPL
Jun 23 10:39:32 nagios-core nagios[2654]: Website: https://www.nagios.org
Jun 23 10:39:32 nagios-core nagios[2654]: Reading configuration data...
Jun 23 10:39:32 nagios-core nagios[2654]: Read main config file okay...
Jun 23 10:39:32 nagios-core nagios[2654]: Read object config files okay...
Jun 23 10:39:32 nagios-core nagios[2654]: Running pre-flight check on configuration data...
Jun 23 10:39:32 nagios-core nagios[2654]: Checking objects...
Jun 23 10:39:32 nagios-core nagios[2654]: Error: Service check command 'check_load -a -w .15,.10,.05 -c .30,.25,.20' specified in service 'CPU Load' for host 'ELK-Stack' not defined an>
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 12 services.
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 2 hosts.
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 1 host groups.
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 0 service groups.
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 1 contacts.
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 1 contact groups.
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 25 commands.
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 5 time periods.
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 0 host escalations.
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 0 service escalations.
Jun 23 10:39:32 nagios-core nagios[2654]: Checking for circular paths...
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 2 hosts
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 0 service dependencies
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 0 host dependencies
Jun 23 10:39:32 nagios-core nagios[2654]: Checked 5 timeperiods
Jun 23 10:39:32 nagios-core nagios[2654]: Checking global event handlers...
Jun 23 10:39:32 nagios-core nagios[2654]: Checking obsessive compulsive processor commands...
Jun 23 10:39:32 nagios-core nagios[2654]: Checking misc settings...
Jun 23 10:39:32 nagios-core nagios[2654]: Total Warnings: 0
Jun 23 10:39:32 nagios-core nagios[2654]: Total Errors: 1
Jun 23 10:39:32 nagios-core nagios[2654]: ***> One or more problems was encountered while running the pre-flight check...
Jun 23 10:39:32 nagios-core nagios[2654]: Check your configuration file(s) to ensure that they contain valid
Jun 23 10:39:32 nagios-core nagios[2654]: directives and data definitions. If you are upgrading from a previous
Jun 23 10:39:32 nagios-core nagios[2654]: version of Nagios, you should be aware that some variables/definitions
Jun 23 10:39:32 nagios-core nagios[2654]: may have been removed or modified in this version. Make sure to read
Jun 23 10:39:32 nagios-core nagios[2654]: the HTML documentation regarding the config files, as well as the
Jun 23 10:39:32 nagios-core nagios[2654]: 'Whats New' section to find out what has changed.
Jun 23 10:39:32 nagios-core systemd[1]: nagios.service: Control process exited, code=exited, status=1/FAILURE
pnikhade
Posts: 12
Joined: Thu Jul 27, 2023 10:23 am

Re: Nagios check_tcp not showing correct status on UI

Post by pnikhade »

Hey, I resolved it myself. Let's close this out.
kg2857
Posts: 490
Joined: Wed Apr 12, 2023 5:48 pm

Re: Nagios check_tcp not showing correct status on UI

Post by kg2857 »

What fixed it?
The following is another issue not related...
Jun 23 10:39:32 nagios-core nagios[2654]: Error: Service check command 'check_load -a -w .15,.10,.05 -c .30,.25,.20' specified in service 'CPU Load' for host 'ELK-Stack' not defined an>
Post Reply