Hello,
Need help in setting up a monitoring a linux host along with the port number from nagios server and alert whenever it is not accessible. Below is the command need to use for monitoring. Please let me know the relevant nrpe command to use for monitoring this.
nc -vz hostname 9094
Regards..
Linux Network Traffic Monitoring
Re: Linux Network Traffic Monitoring
To check for an open port on a system, you can use the check_tcp plugin.
For your example, you would use the following to test for the port 9094 on the hostname.
In the NRPE agent's config files, you would create a command like the following.
Then to use the NRPE command from the Nagios server, you would do this.
Let us know if you have any questions.
For your example, you would use the following to test for the port 9094 on the hostname.
Code: Select all
/usr/local/nagios/libexec/check_tcp -H hostname -p 9094Code: Select all
command[check_tcp]=/usr/local/nagios/libexec/check_tcp -H $ARG1$Code: Select all
/usr/local/nagios/libexec/check_nrpe -H NRPEHost -c check_tcp -a 'hostname -p 9094'Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Linux Network Traffic Monitoring
Hello,
I did the following steps.
command[check_tcp]=/usr/local/nagios/libexec/check_tcp -H $ARG1$ - This was updated the nrpe.cfg
Created a command in the nagios with below command
/usr/local/nagios/libexec/check_nrpe -H NRPEHost -c check_tcp -a 'hostname -p 9094'
and when i try to execute the commmand in the nagios server i get the attached error
I did the following steps.
command[check_tcp]=/usr/local/nagios/libexec/check_tcp -H $ARG1$ - This was updated the nrpe.cfg
Created a command in the nagios with below command
/usr/local/nagios/libexec/check_nrpe -H NRPEHost -c check_tcp -a 'hostname -p 9094'
and when i try to execute the commmand in the nagios server i get the attached error
You do not have the required permissions to view the files attached to this post.
Re: Linux Network Traffic Monitoring
You have a typo in the command. The name of the plugin does not end in a number one "1" so remove that from the command.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Linux Network Traffic Monitoring
Ok. i correct the command and getting the below message when i execute the command.
/usr/local/nagios/libexec/check_tcp -H lxxxv 9094
connect to address lxxxv and port 0: No route to host
How do i use the nc in the syntax as i have requirement to run the below command
nc -vz hostname 9094
/usr/local/nagios/libexec/check_tcp -H lxxxv 9094
connect to address lxxxv and port 0: No route to host
How do i use the nc in the syntax as i have requirement to run the below command
nc -vz hostname 9094
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Linux Network Traffic Monitoring
Hello Scott,
Sorry to miss that it works i see a response to continue on this how do i use nc(netcat) command along with this
Sorry to miss that it works i see a response to continue on this how do i use nc(netcat) command along with this
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Linux Network Traffic Monitoring
I don't understand how you want to use nc(netcat) with a check_tcpnaranant wrote:Hello Scott,
Sorry to miss that it works i see a response to continue on this how do i use nc(netcat) command along with this
nc is for sending data to a port, I'm not sure how you are going to get any response that can be used in a nagios check.
What is your desired output?
What would be a failure?
The check_tcp command should give you equal information as the -vz flag of nc