Deployment Architecture

How to app check deployment status

pmerlin1
Path Finder

Hi everybody

I have a challenge I must to deal with. I would like to create a script to deploy application from en to end. This script must execute many steps :
1) copy app in the deployment-app directory on the deployer
2) reload the configuration server (reload deploy-server)
3) wait until the app deployment is finished
4) return the code status deployment in output

the script can be called by a human or a external tool.

I know that query on metadata index can allow to follow the app installation on the clients :
index=_internal component=deployedapplication OR component=deploymentclient
| sort host _time
| table host _time component message

But this dont tell me if the app is correctly deployed or not

I wonder if anyone has written such a script ? Anyone can guide me or give me advice ?

Regards

Tags (1)
0 Karma

inventsekar
Ultra Champion

exactly i had the same question... it looks like they didnt add any command or tools to check the app deployment status
(from master node to peers as well config deployment as well)

maybe, enable debug options.. that will give some ideas.

#
# Log $SPLUNK_HOME/etc/log-local.cfg:
# Enable DEBUG settings on the both instances in log.cfg 
# (can be done via the UI: Manager -> System Settings -> System logging )
#

- From command line
  @Server # ./splunk set log-level DeploymentServer -level DEBUG 
  @Client # ./splunk set log-level DeploymentClient -level DEBUG 


- From log.cfg (Must restart Splunk after changing this log.cfg)
[splunkd]
category.DeploymentServer = DEBUG

Or, 
category.DeploymentClient=DEBUG

And, possibly
category.HTTPClient = DEBUG
category.TcpInputProc = DEBUG
category.TcpOutputProc = DEBUG
0 Karma

adonio
Ultra Champion

Hello there,
first i will say that i never written such script but seen many deployment server automatons with various automation tools.
second, what is it that you are trying to solve / achieve? Splunk can notify you on deployment errors very easily (i think some alerts on it are pre-configured)
lastly, you can verify the new application was installed on clients (forwarders) via search. from the top of my head:

  index=_internal sourcetype=splunkd action=install app=<yourapp> result=* | table _time host app result

i might be a little off here but if you would like to automate it, you will probably set the app names as tokens and pass them in the form of (app=token1 OR app=token2 OR ... app=tokenN)
then you can set the result field in your message to view or to act upon in another script
kindly verify my search as i did not test it but i think its pretty accurate.
hope it helps

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...