LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-13-2010, 04:04 PM   #1
Shattuckk
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Rep: Reputation: 0
Question Nagios 3: Server port must be an integer


I am trying to monitor a Windows SQL Server, and I am recieving a "Server port must be an integer," error. NSclient++ is running and working properly. Here is the service and command

Command:

define command{
command_name check_nt_mssql_bufcache_hits
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p $USER19$ -s $USER4$
}

Service:

define service{
use generic-service
host_name "host_name"
service_description mssql_bufcache_hits
check_command check_nt_mssql_bufcache_hits!80!50
}

Can't figure it out, any ideas?
 
Old 04-13-2010, 04:07 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Sounds like perhaps $USER19$ isn't being sent as an integer? Maybe it's the wrong variable for this case.
 
Old 04-13-2010, 04:10 PM   #3
Shattuckk
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Any thoughts on what to change it to?
 
Old 04-15-2010, 04:07 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by Shattuckk View Post
I am trying to monitor a Windows SQL Server, and I am recieving a "Server port must be an integer," error. NSclient++ is running and working properly. Here is the service and command

Command:

define command{
command_name check_nt_mssql_bufcache_hits
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p $USER19$ -s $USER4$
}

Service:

define service{
use generic-service
host_name "host_name"
service_description mssql_bufcache_hits
check_command check_nt_mssql_bufcache_hits!80!50
}

Can't figure it out, any ideas?


looks like you have not enough arguments.

run the nagios check from the command line and see what it throws up.
what does the -p and -s flag do?
where is the -w warning and -c critical flag?? i assume -p is port number right?? you are not including that in your check?
a few things look wrong with this check.
run on command line and paste here what you are running.
also run the check without any flags and paste it all here....
 
Old 09-27-2017, 03:32 AM   #5
shakirhussainsyed
LQ Newbie
 
Registered: Sep 2017
Posts: 1

Rep: Reputation: Disabled
Originally Posted by Shattuckk View Post
I am trying to monitor a Windows SQL Server, and I am recieving a "Server port must be an integer," error. NSclient++ is running and working properly. Here is the service and command

Command:

define command{
command_name check_nt_mssql_bufcache_hits
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p $USER19$ -s $USER4$
}

============================================================

Replace $HOSTADDRESS$ with the ip adddress of the SQL Server; $USER19$ must be port number; $USER4$ must be password of the server

Last edited by shakirhussainsyed; 09-27-2017 at 03:34 AM.
 
Old 09-30-2017, 03:59 AM   #6
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,780

Rep: Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198
Leave $HOSTADDRESS$ as is - this is standard. Nagios replaces it by the host address , and makes the checkcommand versatile. Also the $USER1$ is standard.
Your problem is $USER19$, maybe a typo?
As far as I remember the !-separatated arguments are referred as $ARG1$ $ARG2$ etc. They are not used by the current checkcommand.?
 
Old 09-30-2017, 04:20 AM   #7
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,780

Rep: Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198
I have just googled you must look for a file resource.cfg where all the $USERn$ variables are defined.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios 3.1.2 + RHEL 5.3 You don't have permission to access /nagios/ on this server psix Linux - Server 13 08-04-2015 02:25 AM
Nagios Server wasamzy Linux - Server 1 03-16-2010 04:55 PM
Nagios Server Alerts deibertine Linux - Newbie 2 04-03-2009 07:00 PM
Nagios: Server Notifications DaveQB Linux - Software 3 03-26-2009 09:02 PM
Sending integer from server to client Diabolic_Soul Programming 2 12-27-2006 06:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration