serverclass.conf
This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
serverclass.conf
The following are the spec and example files for serverclass.conf.
serverclass.conf.spec
# Copyright (C) 2005-2010 Splunk Inc. All Rights Reserved. Version 4.0
#
# This file contains possible attributes and values for defining server classes to which
# deployment clients can belong. These attributes and values specify what content a given server
# class member will receive from the deployment server.
#
# To define server classes for this deployment server to use when deploying content to deployment
# clients, place a serverclass.conf in $SPLUNK_HOME/etc/system/local/.
# For examples, see serverclass.conf.example. You must restart Splunk for changes to this file
# to take effect.
#
# To learn more about configuration files (including precedence) please see the documentation
# located at http://www.splunk.com/base/Documentation/latest/Admin/Aboutconfigurationfiles
#***************************************************************************
# Configure the server classes that are used by a deployment server instance.
#
# Server classes enable you to create a collection of applications and apply
# filters on them using the hostname, build number of client machines.
# If a target machine matches the filter, then the apps and configuration content that
# make up the server class will be deployed to it.
#
# Property inheritance
# Stanzas in serverclass.conf go from general to more specific, in the following order:
# [serverClass] -> [serverClass:<name>] -> [serverClass:<scname>:app:<appname>]
#
# Some properties defined at a general level (say [serverClass]) can be
# overridden by the more specific stanzas as it applies to them. All inheritable
# properties are marked as such.
#***************************************************************************
# Global stanza that defines properties for all server classes.
[global]
# Overriden by serverClass
repositoryLocation = $SPLUNK_HOME/etc/deployment-apps
* The repository of applications on the server machine.
* Defaults to $SPLUNK_HOME/etc/deployment-apps if not specified in the config file.
targetRepositoryLocation = $SPLUNK_HOME/etc/apps
* The location on the deployment client into which the apps and configuration content defined for this server class should be installed.
* $SPLUNK_HOME/etc/apps is the default directory where server classes are stored. Unless you have specific need, this attributed does
not need to be specified.
tmpFolder = $SPLUNK_HOME/var/run/tmp
* Working folder used by deployment server.
* $SPLUNK_HOME/var/run/tmp is used as default if not specified.
# Overriden by serverClass
continueMatching = <true or false>
* defaults to true
* continue matching server classes, after the first match.
* a serverClass can overload this property and stop the matching.
* matching is done in the order that server classes are defined.
# Overriden by serverClass
endpoint = $deploymentServerUri$/services/streams/deployment?name=$serverClassName$:$appName$
* The endpoint from which content can be downloaded by a deployment client. The deployment client knows how to substitute the values of the variables in the URL.
* Any custom URL can also be supplied here as long as it uses the specified variables.
* This attribute does not need to be specified unless you have very specific need.
# Overriden by serverClass and serverClass:app
filterType = <whitelist or blacklist>
* defaults to whitelist
# Overriden by serverClass and serverClass:app
whitelist.<n> = <ipAddress or hostname or clientName>
blacklist.<n> = <ipAddress of hostname of clientName>
* 'n' is a number starting at 0, and increasing by 1. Stop looking at the filter when 'n' breaks.
* ipAddress of deployment client. Can also use wildcards as 10.1.1.*
* hostname of deployment client. Can also use wildcards as *.splunk.com.
* clientName- a logical or 'tag' name that can be assigned to each deployment client in deploymentclient.conf. clientName takes precedence (over IP/hostname) when matching a client to a filter.
# Note: Overriding one type of filter (whitelist/blacklist) causes the other to the overriden too. It is important to note that
# if you are overriding the whitelist, the blacklist will not be inherited from the parent - you must provide one in the
# stanza.
# Example of when filterType is whitelist
# whitelist.0=*.splunk.com
# blacklist.0=printer.splunk.com
# blacklist.1=scanner.splunk.com
# This will cause all hosts in splunk.com, except 'printer' and 'scanner' to match this server class.
# Example of when filterType is blacklist
# blacklist.0=*
# whitelist.0=*.web.splunk.com
# whitelist.1=*.linux.splunk.com
# This will cause only the 'web' and 'linux' hosts to match the server class. No other hosts will match.
# client machineTypes can also be used to match clients.
# This setting lets you use the hardware type of the deployment client as a filter.
# This filter will be used only if a client could not be matched using the whitelist/blacklist filter.
# The value for machineTypes is a specific string that is designated by the hardware platform itself.
# The method for finding this string on the client itself will vary by platform, but if the deployment client
# is already connected tothe deployment server, you can determine what this string is by using this
# Splunk CLI command on the deployment server:
# <code>./splunk list deploy-clients</code>
# This will return a value for <code>utsname</code> that you can use to
# specify <code>machineTypes</code>.
# Overriden by serverClass and serverClass:app
machineTypes = <comma separated list of machine types - e.g. linux-i686, linux-x86_64>
* Not used unless specified.
* Match any of the machine types in the comma-delimited list.
* Commonly used machine types: linux-x86_64, windows-intel, linux-i686, freebsd-i386, darwin-i386, sunos-sun4u
* This filter will be used only if a client could not be matched using the whitelist/blacklist filter.
* Note: be sure to include the 's' at the end of "machineTypes"
# Overriden by serverClass and serverClass:app
restartSplunkWeb = <True or False>
* defaults to False
* Would the installation of server class or app require a restart of splunkweb on the client.
restartSplunkd = <True or False>
* Defaults to False
* Would the installation of server class or app require a restart of splunkd on the client.
# Overriden by serverClass and serverClass:app
stateOnClient = <enabled, disabled, noop>
* Enable or disable applications on the client after installation.
* When value is noop, the state is not changed, and is retained to what it was on the DS.
[serverClass:<serverClassName>]
* This stanza defines a server class. A serverClass is a collection of applications.
* serverClassName is a unique name that is assigned to this serverClass.
* A serverClass can override all inheritable properties from the [serverClass] stanza.
# Properties that you may want to typically override at this level include:
# repositoryLocation
# continueMatching
# filtering using whitelist/blacklist, startBuild, endBuild, machineType
# requiresRestart
# stateOnClient
# Note: No support for application version yet!!
[serverClass:<server class name>:app:<* or appName>]
* This stanza adds an application that exists in repositoryLocation to the server class.
* serverClassName - the server class to which this content should be added.
* appName = * - causes all content in the repositoryLocation to be added to this serverClass. Having other app declarations when one of them is a '*', causes the other to become redundant.
* appName = some name - will explicitly add the app/configuration content to a server class. Typically apps are named by the folders that contain them.
* Important note on matching: A server class must be matched before content belonging to the server class will be matched by the system.
appFile=<file name>
* In cases where an appName is different from the file or directory name, you can use this parameter to specify the file name. Supported formats are: app directories, .tar or .tgz files.
serverclass.conf.example
# Example 1 # Matches all clients and includes all apps in the server class [global] whitelist.0=* # whitelist matches all clients. [serverClass:AllApps] [serverClass:AllApps:app:*] # a server class that encapsulates all apps in the repositoryLocation # Example 2 # Assign server classes based on hostnames. [global] [serverClass:AppsForOps] whitelist.0=*.ops.yourcompany.com [serverClass:AppsForOps:app:unix] [serverClass:AppsForOps:app:SplunkLightForwarder] [serverClass:AppsForDesktops] filterType=blacklist # blacklist everybody except the Windows desktop machines. blacklist.0=* whitelist.0=*.desktops.yourcompany.com [serverClass:AppsForDesktops:SplunkDesktop] # Example 3 # Deploy server class based on machine types [global] [serverClass:AppsByMachineType] # Ensure this server class is matched by all clients. It is IMPORTANT to have a general filter here, and a more specific filter # at the app level. An app is matched _only_ if the server class it is contained in was succesfully matched! whitelist.0=* [serverClass:AppsByMachineType:app:SplunkDesktop] # Deploy this app only to Windows boxes. machineTypes=windows-intel [serverClass:AppsByMachineType:app:unix] # Deploy this app only to unix boxes - 32/64 bit. machineTypes=linux-i686, linux-x86_64
This documentation applies to the following versions of Splunk: 4.0 , 4.0.1 , 4.0.2 , 4.0.3 , 4.0.4 , 4.0.5 , 4.0.6 , 4.0.7 , 4.0.8 , 4.0.9 , 4.0.10 , 4.0.11 View the Article History for its revisions.