Project

General

Profile

Assign Service to Host » History » Version 9

chin-yeh, 09/09/2010 12:09 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 9 chin-yeh
command[check_ups_sav]=/usr/local/nagios/libexec/check_http -I onlinetools.ups.com -S -u /webservices/XAV -w 10 -c 12
68
command[check_ups_rate]=/usr/local/nagios/libexec/check_http -I onlinetools.ups.com -S -u /webservices/Rate -w 10 -c 12
69 8 chin-yeh
70
# Avalara
71 9 chin-yeh
command[check_avatax]=/usr/local/nagios/libexec/check_http -I avatax.avalara.net -S -u / -w 10 -c 12 -e "HTTP/1.1 403 Forbidden"
72 8 chin-yeh
73
# Authorize.net
74 9 chin-yeh
command[check_authorize]=/usr/local/nagios/libexec/check_http -I secure.authorize.net -S -u /gateway/transact.dll -w 10 -c 12
75 8 chin-yeh
76
... skip
77
</pre>
78
79 4 chin-yeh
h2. Assign eCosway Service
80
81
h2. Assign Jboss Service
82 1 chin-yeh
83 4 chin-yeh
h2. Assign Server Resources Service
84 5 chin-yeh
85 7 chin-yeh
TODO