Every software architect or developer would know the importance of "naming conventions". But this may not be the case with the business users, admins or Project Managers. Hence as a Splunk Administrator my first job is to define the naming conventions of Splunk Objects


Splunk Objects
What do you mean by Splunk objects? Splunk object refers to any configuration item(s) that are under the control of your team. For example, a dashboard you created, a custom splunk app, a report etc. For the splunk objects you may not have direct control, the naming conventions may not apply. So the conventions can be applied only to the objects that are created by you/your team and which you have FULL control. Ensure you are well familiar with Splunk configuration file precedence to understand the object precedence as the naming convention should be built upon it.Naming Conventions and Methodology
- Ensure if your organisation have a naming convention methodology?
- Use camelCase (not underscores) for variables (eg myFirstVariable) within code.
- Use camelCase and underscores instead of spaces for filenames (eg this_is_a_fileName.xml)
- Use NYSE company lookup for your company name (eg IBM, AAPL). This is helpful for prefixing your custom objects
- The apps you create SHOULD start with CAPS. (eg A_custom_ports). This is an exception from having everything with camelCase. The reason behind is in Search Head clustering , the deployer sends the apps to "default" directory thus making your app's contents to get lower privilege than "Splunk_TA" etc., because it starts with "S". I always start my app names with A_ , thus ensuring it always get's priority.
Key objects & configuration items (example in brackets)
- coding variables : (myDashboardRefreshInterval)
- app names : (A_custom_ports)
- Reports: <yourcompany>_rp_<Platform/Device/Service>_<Category>_<TimeInterval>_<Description> (mc_rp_ops_scheduled_24h_batchUpload.xml)
- Dashboards:<yourcompany>_db_<Platform/Device/Service>_<Category>_<Description> (mc_db_ops_management_serverFailures.xml)
- Alerts: <yourcompany>_al_<Platform/Device/Service>_<Category>_<TimeInterval>_<Description> (mc_al_ops_tivoli_10m_userFailure.xml)
- SavedSearches: <yourcompany>_ss_<Platform/Device/Service>_<Category>_<TimeInterval>_<Description> (mc_ss_ops_postProcess_10m_cmdbItems.xml)
Comments
Post a Comment