Ticket #79: smartd.xml

File smartd.xml, 2.4 KB (added by grooverdan, 13 years ago)

smartd.xml service defination for {open}solaris

Line 
1<?xml version='1.0'?>
2<!-- raw version from http://cafenate.wordpress.com/2009/02/22/setting-up-smartmontools-on-opensolaris/
3
4guides:
5http://www.sun.com/bigadmin/content/selfheal/sdev_intro.jsp
6http://hub.opensolaris.org/bin/view/Community+Group+arc/SMF-policy
7
8privileges determination
9pfexec ppriv -e -D -s=file_dac_read,file_dac_write,sys_devices,proc_fork /usr/local/sbin/smartd -q never -c /etc/smartd.conf
10
11
12-->
13<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
14<service_bundle type='manifest' name='smartd'>
15  <service
16     name='system/smartd'
17     type='service'
18     version='1'>
19    <single_instance/>
20
21    <dependency
22       name='filesystem-local'
23       grouping='require_all'
24       restart_on='none'
25       type='service'>
26      <service_fmri value='svc:/system/filesystem/local:default'/>
27    </dependency>
28
29    <dependency
30       name='sendmail-client'
31       grouping='optional_all'
32       restart_on='none'
33       type='service'>
34      <service_fmri value='svc:/network/sendmail-client:default'/>
35    </dependency>
36
37    <dependency name='config_data'
38            grouping='require_all'
39            restart_on='restart'
40            type='path'>
41            <service_fmri
42                value='file://localhost/etc/smartd.conf' />
43    </dependency>
44
45    <exec_method
46       type='method'
47       name='start'
48       exec='/usr/sbin/smartd -q never'
49       timeout_seconds='10'>
50       <!-- anything other than never will check disks - use timeout_seconds='60' for all other options
51         - ~40 disks measured at 31 seconds-->
52      <method_context>
53        <method_credential
54                user='root'
55                group='root'
56                privileges='file_dac_read,file_dac_write,sys_devices,proc_fork'
57        />
58      </method_context>
59    </exec_method>
60
61    <exec_method
62       type='method'
63       name='stop'
64       exec=':kill'
65       timeout_seconds='5'>
66    </exec_method>
67
68    <exec_method
69            type='method'
70            name='refresh'
71            exec=':kill -HUP'
72            timeout_seconds='0'>
73    </exec_method>
74
75    <instance name='default' enabled='false'/>
76
77    <stability value='Unstable'/>
78
79    <template>
80      <common_name>
81        <loctext xml:lang='C'>
82          SMART monitoring
83        </loctext>
84      </common_name>
85      <documentation>
86        <manpage title='smartd' section='1M' manpath='/usr/share/man'/>
87        <manpage title='smartd.conf' section='4' manpath='/usr/share/man'/>
88      </documentation>
89    </template>
90  </service>
91
92</service_bundle>