CloudMonix agent is not required to be installed on Web/Worker roles in order to monitor/scale them. However, it does provide more monitoring capabilities, such as ability to monitor running processes, services, scheduled tasks and execute PowerShell actions.
Web/Worker roles are stateless virtual machines that can be added/removed or re-imaged as needed by the Azure fabric controller. Due to this, adding of an Agent on role instances needs to be done pre-deployment.
Add & save Azure Cloud Role Resources that you wish to monitor in your CloudMonix account
Download pre-configured CloudMonix Agent. Agent is pre-configured for CloudMonix account from which it is downloaded from. Ensure that Agent's configuration in CloudMonix.WindowsAgent.exe.config matches settings on Account Information screen.
Add a new folder to each Web/Worker role in your cloud project that for agent's binaries
Unzip the Agent package and add it to agent folder for each monitored role (example below places the agent in PROD-EUS subfolder)
Instrument CloudMonix agent installation via Startup command directive in the ServiceDefinition.csdef file. commandLine must contain relative path to agent install.cmd file. (Example below matches the image above with respect to folder location)
- Startup directive needs to be present in every Worker or Web role xml block that needs to be monitored
<Startup> <Task commandLine="..\PROD-EUS\install.cmd" executionContext="elevated" taskType="simple" /> </Startup>