AppD Archive

run Machine Agent as service in windows

CommunityUser
Splunk Employee
Splunk Employee

any one now how to setup the java Machine Agent as windows service ?

0 Karma

Arun_Dasetty
Super Champion

Hi,

You can create a windows batch file the has code that looks as follows:

#file machineAgentStartup.bat

java -jar machineagent.jar

run the windows bat file created to windows startup tasks, so that it will be scheduled to start the machine agent on machine startup

Let us know if that helps.

Thanks,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Arun,

After adding the bat file to windows startup it needs a restart, but when we are deploying the agents in Production environments, restarting the servers is a concern.

Is there any other alternative you can think of in this case.

Thanks,

Raghava

0 Karma

Arun_Dasetty
Super Champion

Hi Raghava,

Thanks for the update, let us know if starting machine agent service using net start command helps:
net start "service name"

Thanks,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

hi Arun,

Starting it as a service is a good option.

Can you point me where can I find information to create the service for the agent.

0 Karma

Arun_Dasetty
Super Champion

Hi Raghava,

Currently we do not see an inbuild operating system tool that helps to create service using bat files apart from adding scheduled task as mentioned at link http://support.microsoft.com/kb/137890 , and this os level restriction

To create service using net start command the we need to executable(.exe file) , if you can create exe file using some third party tool that starts machine agent bat having command java -jar machineagent.jar, then  please refer docs for more information on net start command http://technet.microsoft.com/en-us/library/cc736564%28v=ws.10%29.aspx

Please let us know if that helps

Thanks,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hello all,

we are using external tool Tanuki Service Wrapper for it. It works fine.

Another idea is to write perhaps a service with sc.exe - command but we didn't test it.

regards

Martin

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

As a future enhancement can we expect from AppDynamics seperate Machine agent for windows boxes as a exe, which when we run on any windows box create a service similar to controller installation, where we have option to create services for application and database service. 

0 Karma

Arun_Dasetty
Super Champion

Hi Kaushik,

We already have this feature on roadmap and we have internal feature request filed for to run machine agent as windows service, Hope this answers your query.

Let us know if this doc helps while we are working on the feature request.

http://docs.appdynamics.com/display/PRO13S/Configure+Machine+Agents+in+a+.NET+Environment#ConfigureM...

Thanks,

Arun

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...