Page 2 of 3
Re: SAP 9.0 and More.
Posted: Wed Apr 13, 2016 10:43 am
by lcontreras
Hi snchestnut01,
Let us know if the workaround provided was helpful.
regards,
Re: SAP 9.0 and More.
Posted: Wed Apr 13, 2016 2:02 pm
by rkennedy
Thanks @lcontreras!
@snchestnut01 - let us know when you get a chance to look over the responses here.
Re: SAP 9.0 and More.
Posted: Wed Apr 13, 2016 2:17 pm
by snchestnut01
Thank you both very much, I'll watch and give it a shot and update the thread when I have an answer for you.
Re: SAP 9.0 and More.
Posted: Wed Apr 13, 2016 3:09 pm
by rkennedy
Sounds good, we'll watch for your response.
Re: SAP 9.0 and More.
Posted: Wed Apr 27, 2016 12:46 pm
by snchestnut01
Okay, I finally had time to go and check this... sorry for taking so long to get back to your all, but this is what information I took away from the page I was sent to.
In the path /usr/local/nagios/etc/objects exists a file named commands.cfg, add the following lines at the end of the file:
# ‘check_nrpe’ command definition
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$
}
Here we define the command check_nrpe for later use. After adding the lines above, reload nagios service, just run the following from the command line:
service nagios reload
In the same path mentioned before /usr/local/nagios/etc/objects there is another file named windows.cfg, within this file we’re going to define our SAP server, add these lines, preferably under your windows servers are defined:
define host{
use windows-server ;
host_name laboratorio17 ; hostname of your sap server
alias SAP Server; a description of our server
address 192.168.111.200 ; poner la ip de su servidor sap
}
Even we’ve configured the NRPE plugin for monitoring on this tutorial, we will use it later.
There are 3 major ports on SAP, they are: 3200, 3300 and 3600. A short description of them:
Port 3200 – SAP Dispatcher, its range is from 3200 to 3299.
Port 3300 – Gateway, its range is from 3300 to 3399.
Port 3600 – Message Server, its range is from 3600 to 3699.
The main goal of this tutorial is to monitor major SAP ports, after we have defined our SAP server in the windows.cfg file, in that file we will proceed to define the services for monitoring the ports.
# Port 3200
define service{
use generic-service
host_name laboratorio17
service_description SAP Dispatcher 3200
check_command check_tcp!3200
}
# Port 3300
define service{
use generic-service
host_name laboratorio17
service_description SAP Gateway 3300
check_command check_tcp!3300
}
# Port 3200
define service{
use generic-service
host_name laboratorio17
service_description Message Server 3600
check_command check_tcp!3600
}
Everything is good until I reach the point where they ask you to access the Objects folder. It seems that Nagios XI does not have this file path:
/usr/local/nagios/etc/objects
So when I try to access the configuration file, it doesn't exist. I've checked all throughout Nagios to find this folder so I can add these checks (and a few other service checks to check and make sure that the services haven't crashed) and cannot find it because, as I was told in the past, "NagiosXI isn't reliant on Nagios' Core to run it's checks, that's what the wizards are for." So I either need to know where the config file is for NagiosXI so I can add these checks into the NRPE portion or I need some other way to monitor this service. It's one of the most important servers we have an MUST bet monitored.
Also, is there a way to write a custome Windows service check into the config file? For instance, lets say that I wanted to check on *random service on windows Server,* how could I do that through the NRPE/NSClient++ configuration.
Re: SAP 9.0 and More.
Posted: Wed Apr 27, 2016 1:47 pm
by rkennedy
Since you're using Nagios XI - things are going to be managed through the web interface. Any files you modify, will not be preserved, as XI uses a SQL backend.
Everything you've done sounds correct. You're going to want to do it a different way though.
Navigate to Nagios XI -> Configure -> Core Config Manager -> Hosts -> + Add New - here, fill out the similar settings you did previously, except through a GUI.
Now, go back to the Configure -> Core Config Manager -> Services -> + Add New - here, click 'Manage Hosts' and select the host you just added. Then, define your setup similar to how you did before.
- Manage Templates = Generic Service
- Description is pretty self explanatory
- Check command will be check_tcp and $ARG1$ will be 3200 (or 3300,3600, etc)
Once this is all done, click 'Apply Configuration'. Now, what will happen is all of your previously saved configuration that you just did (which was saved to SQL), will be written to file, and the nagios service will be restarted.
Let us know if you run into any issues.
Re: SAP 9.0 and More.
Posted: Wed Apr 27, 2016 2:47 pm
by snchestnut01
So... assuming I want to check if a windows service is running on a particular server I would use which Check_command in order to check?
Re: SAP 9.0 and More.
Posted: Wed Apr 27, 2016 3:12 pm
by rkennedy
You'd want to use NSClient++ with check_nt, or check_nrpe.
Re: SAP 9.0 and More.
Posted: Thu Apr 28, 2016 12:44 pm
by snchestnut01
Awesome, I'll give this a shot.
Re: SAP 9.0 and More.
Posted: Thu Apr 28, 2016 1:15 pm
by rkennedy
I'll leave this open - let us know if you have any further questions!