Project

General

Profile

Assign Service to Host » History » Version 8

chin-yeh, 09/09/2010 12:08 PM

1 3 chin-yeh
{{toc}}
2
3 2 chin-yeh
h1. Assign Service to Host
4 1 chin-yeh
5
A service should be grouped under a specify service group to ease the configuration tasks.
6 2 chin-yeh
7 1 chin-yeh
*[Important]* Prepare the following information before begin:
8 7 chin-yeh
* *host name* - the host name of the host to be assigned
9
* *service group* - the group name of the service to be monitored
10 3 chin-yeh
11
List of available services:
12 6 chin-yeh
* [[Assign Service to Host#Assign-DB2-service|DB2]]
13
* [[Assign Service to Host#Assign-Third-Party-Service|Third Party Service]]
14
* [[Assign Service to Host#Assign-eCosway-Service|eCosway Application]]
15
* [[Assign Service to Host#Assign-Jboss-Service|Jboss]]
16
* [[Assign Service to Host#Assign-Server-Resources-Service|Server Resources]] 
17 1 chin-yeh
18
h2. Assign DB2 service
19
20 7 chin-yeh
Assumes that the target DB2 host has a @nagios@ user and the user has the monitor related privileges assigned.
21
22
The currently available commands for DB2 service are:
23
* *db2_connect_cmd* - check the time taken to establish connection to DB2
24
25
You may need the following additional information:
26
* *database name* - the name of the database to be monitored
27
* *warning threshold* - the warning threshold of this service in seconds unit, e.g. 3 for seconds
28
* *critical threshold* - the critical threshold of this service in seconds unit, e.g. 5 for seconds
29
30
h3. Steps
31
32
# login to the nagios server with @nagios@ user
33
# edit the @/usr/local/nagios/etc/ecosway/services/db2_services.cfg@
34
<pre>
35
nagios$ vi /usr/local/nagios/etc/ecosway/services/db2_services.cfg
36
</pre>
37
* Template:
38
<pre>
39
define service{
40
        use                     db2-service
41
        service_description     describe your service here
42
        host_name               host name
43
        check_command           db2_connect_cmd!database name!warning threshold!critical threshold
44
        }
45
</pre>
46
* Example:
47
<pre>
48
define service{
49
        use                     db2-service
50
        service_description     DB2 Connect - MY_STORE database
51
        host_name               cwydb1
52
        check_command           db2_connect_cmd!my_store!3!5
53
        }
54
</pre>
55
56
57 4 chin-yeh
h2. Assign Third Party Service
58
59 8 chin-yeh
This service is using *NRPE* addon and *check_http* command. Therefore, you may refer to the [[Documentation#Install-NRPE-optional|NRPE]] for the configuration details.
60
61
I will assume that you have the following things configured on the remote host and got the @NRPE@ up and running in the background:
62
* Remote Host: @/usr/local/nagios/etc/nrpe.cfg@
63
<pre>
64
... skip 
65
66
# UPS
67
command[check_ups_sav]=/usr/local/nagios/libexec/check_http -I onlinetools.ups.com -S -u /webserv
68
ices/XAV -w 10 -c 12
69
command[check_ups_rate]=/usr/local/nagios/libexec/check_http -I onlinetools.ups.com -S -u /webser
70
vices/Rate -w 10 -c 12
71
72
# Avalara
73
command[check_avatax]=/usr/local/nagios/libexec/check_http -I avatax.avalara.net -S -u / -w 10 -c
74
 12 -e "HTTP/1.1 403 Forbidden"
75
76
# Authorize.net
77
command[check_authorize]=/usr/local/nagios/libexec/check_http -I secure.authorize.net -S -u /gate
78
way/transact.dll -w 10 -c 12
79
80
... skip
81
</pre>
82
83 4 chin-yeh
h2. Assign eCosway Service
84
85
h2. Assign Jboss Service
86 1 chin-yeh
87 4 chin-yeh
h2. Assign Server Resources Service
88 5 chin-yeh
89 7 chin-yeh
TODO