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
SplunkTrust
SplunkTrust

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!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...