### Common SolarWinds Product Documentation Structure Source: https://context7.com/context7/solarwinds/llms.txt This snippet outlines the consistent directory structure for SolarWinds product documentation, including the landing page, getting started guide, administrator guide, release notes, system requirements, and previous versions. It provides an example for listing all markdown files for a product. ```bash # Every SolarWinds product follows consistent documentation structure: # 1. Documentation landing page # [Product]_Documentation.md # Contains: Quick links, guide overview, product information # 2. Getting Started Guide # [Product]_Getting_Started_Guide.md # Contains: Installation, initial configuration, basic setup # 3. Administrator Guide # [Product]_Administrator_Guide.md # Contains: Advanced features, configuration options, best practices # 4. Release Notes # release_notes/release_notes.md # Contains: New features, bug fixes, upgrade notes, known issues # 5. System Requirements # System_Requirements/system_requirements.md # Contains: Hardware specs, OS versions, database requirements, ports # 6. Previous Versions # content/previous_versions.md # Contains: Links to archived documentation for older versions # Example: Accessing complete documentation for any product PRODUCT="npm" # Change to: sam, ncm, ipam, dpa, whd, etc. cd /app/repos/websites/solarwinds/en/Success_Center/$PRODUCT/ # List all documentation files find . -name "*.md" -type f | sort ``` -------------------------------- ### Access Pingdom Documentation and Guides Source: https://context7.com/context7/solarwinds/llms.txt This snippet demonstrates how to navigate to the Pingdom documentation directory and list available guides. It includes accessing the main documentation hub, getting started guide, and administrator guide. ```bash # Access Pingdom documentation cd /app/repos/websites/solarwinds/en/pingdom/Content/ # Available documentation ls -l # pingdom_Documentation.md # Main hub # pingdom_Getting_Started_Guide.md # Setup guide # pingdom_Administrator_Guide.md # Admin reference ``` -------------------------------- ### Example Dockerfile for .NET Framework 4.8 Web Application Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/dotnet/install-windows-container This is a complete example Dockerfile for a .NET Framework 4.8 web application. It includes setting up the base image, configuring PowerShell, setting environment variables for the SolarWinds agent, downloading certificates, and copying the agent installer. ```dockerfile # escape=` FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] # Set environment variables ENV COMPLUS_LoaderOptimization=1 \ SW_APM_TRUSTEDPATH='c:\cert\cacert.pem' # Download and copy certificate under c:\cert directory RUN $certRoot = $env:SystemDrive + '\cert\' ; \ mkdir $certRoot ; \ Invoke-WebRequest https://curl.se/ca/cacert.pem -OutFile "$certRoot\cacert.pem" ; # Copy installer ADD ./SolarWindsAPM_DotNetAgent_Setup.exe c:/SolarWindsAPM_DotNetAgent_Setup.exe ADD ./conf.inf c:/conf.inf ``` -------------------------------- ### Configuration File for Command Line Install Source: https://documentation.solarwinds.com/en/success_center/appoptics/content/kb/apm_tracing/dotnet/install This is an example of the conf.inf file used with the AppOptics .NET Agent command-line installer. It specifies the service key required for agent configuration. ```ini [Setup] service_key=*service-key* ``` -------------------------------- ### Install AppOptics Go Agent (Legacy) Source: https://documentation.solarwinds.com/en/success_center/appoptics/content/kb/apm_tracing/go/install Instructions for installing the legacy AppOptics Go Agent. This involves using the 'go get' command to fetch the package. The service key must be configured separately for successful setup. This agent is no longer receiving updates. ```go go get github.com/appoptics/appoptics-apm-go/v1/ao ``` -------------------------------- ### Download and Install AppOptics .NET Agent (Windows) Source: https://documentation.solarwinds.com/en/success_center/appoptics/content/kb/apm_tracing/dotnet/install This snippet outlines the steps to download and install the AppOptics .NET agent on Windows. It includes stopping and starting IIS using the 'iisreset' command and running the installer with a service key. This process is applicable for both .NET Framework and .NET Core/5+ applications. ```bash iisreset /STOP # Download installer from https://files.appoptics.com/dotnet/DotNetAgent_Setup.exe # Run installer and provide service key iisreset /START ``` -------------------------------- ### Access Loggly Documentation and Guides Source: https://context7.com/context7/solarwinds/llms.txt This snippet shows how to navigate to the Loggly documentation directory and list available guides. It covers accessing the main documentation hub, administrator guide, and getting started guide. ```bash # Access Loggly documentation cd /app/repos/websites/solarwinds/en/loggly/Content/ # Available guides: ls -l # loggly_Documentation.md # Main documentation hub # loggly_Administrator_Guide.md # Admin configuration # loggly_Getting_Started_Guide.md # Initial setup ``` -------------------------------- ### Example Command for -onboard-databases Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/configure-database-headless-install This snippet shows an example of how to execute the -onboard-databases command, specifying the parameters file and the onboard databases configuration file. ```bash ./dbo-headless-installer -swoparams=bin/inputs/prodPublicApiParams.json -onboard-databases=inputs/prodPublicApiOnboardParam.json ``` -------------------------------- ### Automated .NET Library Installation in Docker Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/dotnet/install-windows-container This script automates the installation of the .NET Library within a Docker container. It handles setting the installer directory, executing the setup with silent parameters, logging the process, and exiting with an error code if the installation fails. ```powershell RUN $installerDir = $env:SystemDrive; \ cd $installerDir ; \ $processStartInfo = New-Object System.Diagnostics.ProcessStartInfo ; \ $arguments = '/SILENT /CLOSEAPPLICATIONS /LOADINF="conf.inf" /COMPONENTS="IISOnly" /LOG="installer.log"' ; \ $installer = $installerDir + '\SolarWindsAPM_DotNetAgent_Setup.exe' ; \ $processStartInfo.FileName = $installer ; \ $processStartInfo.Arguments = $arguments ; \ $process = New-Object System.Diagnostics.Process ; \ $process.StartInfo = $processStartInfo ; \ $process.Start() | Out-Null ; \ $process.WaitForExit() ; \ $result = $process.ExitCode ; \ echo "result: $result" ; \ if ($result -ne 0) { \ echo "Failed to install .NET Library" ; \ exit $result; \ } ; \ echo ".NET Library installed." ; ``` -------------------------------- ### Start Web Help Desk Services on Linux Source: https://documentation.solarwinds.com/en/Success_Center/WHD/Content/HelpDeskStartAndStopWHDServices Instructions for starting Web Help Desk services on a Linux system using RPM installations. Requires running the start script from the terminal with sudo privileges. ```bash cd /usr/local/webhelpdesk/ sudo ./whd start ``` -------------------------------- ### Start IIS Source: https://documentation.solarwinds.com/en/success_center/appoptics/content/kb/apm_tracing/dotnet/install Command to restart IIS after the AppOptics .NET Agent has been uninstalled. ```Shell iisreset /START ``` -------------------------------- ### Example Ansible Playbook for Windows Installation Source: https://documentation.solarwinds.com/en/success_center/appoptics/content/kb/host_infrastructure/host_agent/installation_ansible An example Ansible playbook for installing the solarwinds.swisnap role on Windows hosts. It includes the use of a variable file for configuration, such as the SolarWinds token and the download path for the Windows installer. ```yaml - hosts: windows vars_files: - vars/main.yml roles: - solarwinds.swisnap ``` -------------------------------- ### Database Monitor Examples Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-python-script-examples Examples demonstrating how to use the Database Monitor API endpoints for retrieving information, starting, and stopping monitoring for database instances. ```APIDOC ## GET /databases/{database_id}/monitor-information ### Description Retrieves detailed monitoring information for a specific monitored database instance. ### Method GET ### Endpoint `/databases/{database_id}/monitor-information` ### Parameters #### Path Parameters - **database_id** (integer) - Required - The unique identifier of the database instance. ### Response #### Success Response (200) - **data** (object) - An object containing the monitoring details of the database instance. ### Response Example ```json { "dbId": 1, "name": "DEV-DPA\SQLEXPRESS", "ip": "127.0.0.1", "port": "1433", "jdbcUrlProperties": "applicationIntent=readOnly", "connectionProperties": null, "databaseType": "SQL Server", "databaseVersion": "12.0.6205.1", "databaseEdition": "Enterprise Edition: Core-based Licensing (64-bit)", "monitoringUser": "ignite_next", "defaultDbLicenseCategory": "DPACAT2", "assignedDbLicenseCategory": "DPACAT2", "assignedVmLicenseCategory": null, "monitorState": "Monitor Stopped", "oldestMonitoringDate": "2018-12-09T00:00:00.000-07:00", "latestMonitoringDate": "2019-01-07T00:00:00.000-07:00", "agListenerName": null, "agClusterName": null, "agName": null, "racInfo": null, "rac": false, "rds": false, "ebusiness": false, "linkedToVirtualMachine": false, "pdb": false } ``` ``` ```APIDOC ## PUT /databases/{database_id}/monitor-status ### Description Starts or stops the monitoring service for a specific database instance. ### Method PUT ### Endpoint `/databases/{database_id}/monitor-status` ### Parameters #### Path Parameters - **database_id** (integer) - Required - The unique identifier of the database instance. #### Request Body - **command** (string) - Required - The command to execute. Accepts 'START' or 'STOP'. ### Request Example ```json { "command": "START" } ``` ### Response #### Success Response (200) - **data** (string) - A success message, typically 'SUCCESS'. ### Response Example ```json "SUCCESS" ``` ``` ```APIDOC ## GET /databases/monitor-information ### Description Retrieves monitoring information for all currently monitored database instances. ### Method GET ### Endpoint `/databases/monitor-information` ### Response #### Success Response (200) - **data** (array) - An array of objects, where each object contains the monitoring details of a database instance. ### Response Example ```json [ { "dbId": 1, "name": "DEV-DPA\SQLEXPRESS", "ip": "127.0.0.1", "port": "1433", "databaseType": "SQL Server", "monitorState": "Monitor Stopped" } // ... more database instances ] ``` ``` -------------------------------- ### Command Line Install with Configuration File Source: https://documentation.solarwinds.com/en/success_center/appoptics/content/kb/apm_tracing/dotnet/install This command demonstrates how to automate the installation of the AppOptics .NET Agent using a configuration file (conf.inf) and specifies components to install. Square brackets indicate optional parameters, and the pipe character separates choices. ```bash DotNetAgent_Setup.exe [/SILENT | /VERYSILENT] /LOADINF="conf.inf" /COMPONENTS="IISOnly[,NonIISApplications,IISCoreApplication,NonIISCoreApplication]" [/CLOSEAPPLICATIONS | /NOCLOSEAPPLICATIONS] ``` -------------------------------- ### Create and Configure New IIS Application Pool and Website Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/dotnet/install-windows-container Creates a new IIS application pool named 'DefaultAppPool' and a website named 'webapp'. It configures the application pool settings (runtime version, identity, pipeline mode) and the website's physical path and bindings, then starts the website. ```powershell RUN Import-Module WebAdministration ; ` $wwwRoot = $env:SystemDrive + '\inetpub\wwwroot' ; ` $appName = 'webapp' ; ` $appPoolName = 'DefaultAppPool' ; ` $runtimeVersion = 'v4.0' ; ` $identity = 'ApplicationPoolIdentity' ; ` $pipelineMode = 'Integrated' ; ` $bindings=@( @{protocol='http' ; bindingInformation='*:80:'} ) ; ` New-Item -Path "IIS:\AppPools" -Name "$appPoolName" -Type AppPool ; ` Set-ItemProperty -Path "IIS:\AppPools\$appPoolName" -Name managedRuntimeVersion -Value "$runtimeVersion" ; ` Set-ItemProperty -Path "IIS:\AppPools\$appPoolName" -Name processModel -Value @{'identitytype' = $identity} ; ` Set-ItemProperty -Path "IIS:\AppPools\$appPoolName" -Name managedPipelineMode -Value "$pipelineMode" ; ` New-Website -Name $appName -ApplicationPool $appPoolName -PhysicalPath $wwwRoot\$appName ; ` Set-ItemProperty -Path "IIS:\Sites\$appName" -Name bindings -Value $bindings ; ` Start-IISSite -Name "$appName" ; ``` -------------------------------- ### Start All Database Monitors (Python) Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-python-script-examples This script initiates the 'START' command for all database monitors. It sends a PUT request to the monitor-status endpoint with the command set to 'START' and waits for 30 seconds after completion. Requires the 'requests' library. ```python monitor_url = f"{base_url}databases/monitor-status" try: print("\n*** Starting all Monitors ***") body = {"command": "START"} response = requests.put(monitor_url, json=body, headers=header, verify=verify_cert) response.raise_for_status() response_json = response.json() print(json.dumps(response_json["data"], indent=2)) print("Waiting 30 seconds...") time.sleep(30) except requests.exceptions.HTTPError as e: print(e) print(e.response.text) ``` -------------------------------- ### Install ASP.NET Core Hosting Module Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/dotnet/install-windows-container This script downloads and installs the ASP.NET Core 6.0 Hosting Bundle. It includes error handling for the installation process and cleans up the downloaded installer. The download URL can be updated for different ASP.NET Core versions. ```powershell RUN Invoke-WebRequest https://download.visualstudio.microsoft.com/download/pr/d7124775-38c9-460f-a269-7bc131b3dfbf/7f60bcc6030e408cf11a935d5451ffa4/dotnet-hosting-6.0.20-win.exe -OutFile c:\dotnet-hosting-win.exe ; ` $appRoot = $env:SystemDrive ; ` cd $appRoot ; ` $processStartInfo = New-Object System.Diagnostics.ProcessStartInfo ; ` $arguments = '/install /quiet /norestart /log install.hosting.log' ; ` $installer = $appRoot + '\dotnet-hosting-win.exe' ; ` $processStartInfo.FileName = $installer ; ` $processStartInfo.Arguments = $arguments ; ` $process = New-Object System.Diagnostics.Process ; ` $process.StartInfo = $processStartInfo ; ` $process.Start() | Out-Null ; ` $process.WaitForExit() ; ` $result = $process.ExitCode ; ` echo "result: $result" ; ` if ($result -ne 0) { ` echo "Failed to install ASP.NET Core Hosting Bundle." ; ` exit $result; ` } ; ` echo "ASP.NET Core Hosting Bundle installed." ; ` Remove-Item -Force C:\dotnet-hosting-win.exe; ` Remove-Item -Force -Recurse $env:Temp\* ``` -------------------------------- ### Copying Installer and Configuration Files to Docker Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/dotnet/install-windows-container These commands copy the SolarWinds APM .NET Agent installer executable and its configuration file into the Docker image filesystem. This is a prerequisite for the installation step. ```dockerfile ADD ./SolarWindsAPM_DotNetAgent_Setup.exe c:\SolarWindsAPM_DotNetAgent_Setup.exe ADD ./conf.inf c:\conf.inf ``` -------------------------------- ### Install SolarWinds APM and Bootstrap Instrumentation Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/python/install Installs the solarwinds-apm Python library and the psutil package from PyPI. It then runs the opentelemetry-bootstrap command to detect and install applicable instrumentation packages for your system. Ensure all other service dependencies are installed first. ```bash pip install solarwinds-apm "psutil>=5.0" opentelemetry-bootstrap --action=install ``` -------------------------------- ### Example Cisco CLI Commands for Device Configuration Source: https://documentation.solarwinds.com/en/success_center/kct/content/kct_ag_device-cli-sendcommands Provides examples of common CLI commands for Cisco routers and Catalyst switches used to modify device configurations. Commands are entered line by line, and blank lines are treated as 'Enter'. ```text Clear counters Clear interface ``` ```text Set Port 1/1 disable Set Port 2/12-24 enable ``` -------------------------------- ### SolarWinds Platform Installation and Upgrade Guide Source: https://documentation.solarwinds.com/en/success_center/orionplatform/content/release_notes/solarwinds_platform_2025-2_release_notes This section provides instructions for installing or upgrading the SolarWinds Platform. It directs users to download the installer from the SolarWinds website or Customer Portal for new deployments, use the License Manager for activation in existing deployments, and initiate upgrades via Settings > My Deployment. It also references relevant documentation for installation, upgrades, and supported upgrade paths. ```text For new SolarWinds Platform deployments, download the installation file from the product page on https://www.solarwinds.com or from the Customer Portal. For more information, see Get the installer. To activate your product in an existing SolarWinds Platform deployment, use the License Manager. For upgrades, go to Settings > My Deployment to initiate the upgrade. The SolarWinds Installer upgrades your entire deployment (all SolarWinds Platform products and any scalability engines). For more information, see the SolarWinds Platform Product Installation and Upgrade Guide. For supported upgrade paths, see Upgrade an existing deployment. ``` -------------------------------- ### Kubernetes Monitoring Configuration (values.yaml) Source: https://documentation.solarwinds.com/en/success_center/observability/content/get-started/k8s_getting_started_guide Example `values.yaml` file content for configuring the SolarWinds Observability Kubernetes Collector Helm chart. This file specifies necessary parameters for the collector's deployment and integration with SolarWinds Observability SaaS. ```yaml image: repository: solarwinds/swok8s-collector tag: "latest" solarwinds: ingestionApiKey: "YOUR_API_KEY" tenantId: "YOUR_TENANT_ID" kubernetes: namespace: "default" prometheusUrl: "http://prometheus.example.com:9090" ``` -------------------------------- ### Copy Varnish Example Task File (Bash) Source: https://documentation.solarwinds.com/en/success_center/appoptics/content/kb/host_infrastructure/integrations/varnish Bash command to copy the example Varnish task configuration file to the active configuration directory. This is the first step in enabling Varnish monitoring. ```bash sudo cp -p /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-varnish.yaml.example /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-varnish.yaml ``` -------------------------------- ### Run Kiwi CatTools Installer Source: https://documentation.solarwinds.com/en/success_center/kct/content/kct_upgrade_guide Executes the Kiwi CatTools setup executable. It may prompt for .NET Framework installation if it's not already present. ```shell Kiwi_CatTools_.setup.exe ``` -------------------------------- ### Start DPA Service Source: https://documentation.solarwinds.com/en/success_center/dpa/content/install-dpa-on-linux This command starts the Database Performance Analyzer (DPA) service after it has been installed. It is executed from the DPA Home directory. The output indicates whether the service started successfully. ```bash ./startup.sh ``` -------------------------------- ### Get All Database Monitor Information (Python) Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-python-script-examples This script retrieves monitor status information for all database instances. It makes a GET request to the monitor-information endpoint and parses the JSON response. It identifies and lists database IDs of monitors that are running or in a 'Start' state. Requires the 'requests' library. ```python database_id = 1 running_ids = [] monitor_url = f"{base_url}databases/monitor-information" try: print("\n*** Get Information for a all database instances ***") response = requests.get(monitor_url, headers=header, verify=verify_cert) response.raise_for_status() response_json = response.json() data = response_json["data"] print(json.dumps(data, indent=2)) for monitor in data: state = monitor["monitorState"] if state == "Monitor Running" or state == "Monitor Start No License" or 'Start' in state: running_ids.append(monitor["dbId"]) print(f"Running Monitors: {running_ids}") except requests.exceptions.HTTPError as e: print(e) print(e.response.text) ``` -------------------------------- ### Configure IIS Application Pool and Website Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/dotnet/install-windows-container This script configures IIS by removing existing default website and app pool, creating a new application pool named 'DefaultAppPool' with specific runtime version and identity, and then creating a new website 'webapp' linked to this app pool and physical path. It also sets up HTTP bindings and starts the site. ```powershell RUN Import-Module WebAdministration ; ` Get-WebSite -Name 'Default Web Site' | Remove-WebSite -Confirm:$false -Verbose ; ` Remove-WebAppPool -Name "DefaultAppPool" -Confirm:$false -Verbose ; ` $wwwRoot = $env:SystemDrive + '\inetpub\wwwroot' ; ` $appName = 'webapp' ; ` $appPoolName = 'DefaultAppPool' ; ` $runtimeVersion = 'v4.0' ; ` $identity = 'ApplicationPoolIdentity' ; ` $pipelineMode = 'Integrated' ; ` $bindings=@( @{protocol='http' ; bindingInformation='*:80:'} ) ; ` New-Item -Path "IIS:\AppPools" -Name "$appPoolName" -Type AppPool ; ` Set-ItemProperty -Path "IIS:\AppPools\$appPoolName" -Name managedRuntimeVersion -Value "$runtimeVersion" ; ` Set-ItemProperty -Path "IIS:\AppPools\$appPoolName" -Name processModel -Value @{'identitytype' = $identity} ; ` Set-ItemProperty -Path "IIS:\AppPools\$appPoolName" -Name managedPipelineMode -Value "$pipelineMode" ; ` New-Website -Name $appName -ApplicationPool $appPoolName -PhysicalPath $wwwRoot\$appName ; ` Set-ItemProperty -Path "IIS:\Sites\$appName" -Name bindings -Value $bindings ; ` Start-IISSite -Name "$appName" ; ``` -------------------------------- ### Run Application with opentelemetry-instrument Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/python/install Launches your Python service using the `opentelemetry-instrument` command. This command automatically wraps common Python frameworks to start exporting traces and metrics, provided the service key is set as an environment variable. ```bash opentelemetry-instrument command_to_run_your_service ``` -------------------------------- ### Find SolarWinds Documentation by Name (Bash) Source: https://context7.com/context7/solarwinds/llms.txt These commands demonstrate how to find specific types of documentation within the SolarWinds repository using the 'find' utility. They are useful for locating guides like 'Getting Started' or 'Administrator' guides for particular products. ```bash # Find getting started guides find /app/repos/websites/solarwinds -name "*Getting_Started*" -type f # Find administrator guides for a specific product (NPM) find /app/repos/websites/solarwinds/en/Success_Center/npm -name "*Administrator*" ``` -------------------------------- ### Get All Database Monitor Information (PowerShell) Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-powershell-script-examples Retrieves monitor information for all databases using a GET request to the SolarWinds API. It then filters and lists the IDs of monitors that are running or in a started state. This information is stored for later use. ```powershell $monitorURL = $baseURL + "databases/monitor-information" Try { Write-Host "Get Monitor Information for all databases..." $monitorListJSON = Invoke-RestMethod -Method Get -Uri $monitorURL -Headers $dpaHeader -TimeoutSec 60 $monitorList = $monitorListJSON.data $monitorList | Format-Table -AutoSize $runningIds = @() foreach ($monitor in $monitorList) { if ($monitor.monitorState -eq "Monitor Running" -or $monitor.monitorState -eq "Monitor Start No License" -or $monitor.monitorState -like '*Start*') { $runningIds += $monitor.dbId } } Write-Host "Running Monitors: $runningIds`r`n" } Catch { handleError $Error[0] } ``` -------------------------------- ### API Parameters Configuration for Headless Installer Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/configure-database-headless-install Example JSON configuration for API parameters used with the SolarWinds headless installer. It specifies the SolarWinds Observability (SWO) API endpoint URL and an API token. ```json { "swoUrl" : "https://api.na-01.cloud.solarwinds.com", // this is SWO api endpoint "apiToken": "" } ``` -------------------------------- ### Install AppOptics .NET Agent for IIS Applications (Windows) Source: https://documentation.solarwinds.com/en/success_center/appoptics/content/kb/apm_tracing/dotnet/install This snippet details the installation process for instrumenting IIS hosted .NET Framework and .NET Core/5+ applications with the AppOptics .NET agent. It involves stopping IIS, running the installer with specific options, and then restarting IIS. ```bash iisreset /STOP # Run the .NET agent installer: # Select 'Instrument IIS .NET Framework Applications' for .NET Framework applications # Select 'Instrument IIS .NET Core Applications' for .NET Core/5+ applications iisreset /START ``` -------------------------------- ### Automate Kiwi CatTools Installation (Standard App) Source: https://documentation.solarwinds.com/en/success_center/kct/content/kct_ag_automate_cattools_installation This batch script automates the installation of Kiwi CatTools as a standard interactive application. It requires the path to the installer and the desired installation directory. The script first executes the installer with silent install flags and then starts the application. ```batch "*AppPath\CatTools_X.X.X.exe" /S INSTALL=APP /D=*InstallPath "*InstallPath\CatTools.exe" ``` ```batch "C:\CatTools_3.5.0.setup.exe" /S INSTALL=APP /D="C:\Program Files\CatTools3" "C:\Program Files\CatTools3\CatTools.exe" ``` -------------------------------- ### Start All Database Monitors (PowerShell) Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-powershell-script-examples Initiates a 'START' command for all database monitors via a REST API PUT request. This action is followed by a 30-second pause to allow the operations to complete, with error handling included. ```powershell $monitorURL = $baseURL + "databases/monitor-status" Try { Write-Host "Starting all Monitors..." $command = @{"command" = "START"} | ConvertTo-Json $monitorJSON = Invoke-RestMethod -Method Put -Uri $monitorURL -Body $command -Headers $dpaHeader -TimeoutSec 60 $result = $monitorJSON.data Write-Host "Result: $result" Write-Host "Waiting 30 seconds...`r`n" Start-Sleep -s 30 } Catch { handleError $Error[0] } ``` -------------------------------- ### Listing SolarWinds HttpModule Properties Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/dotnet/install-windows-container This command imports the WebAdministration module and retrieves the properties of the SolarWindsAPM HttpModule installed within IIS. It helps in verifying the installation and understanding the configured settings. ```powershell RUN Import-Module WebAdministration ; \ $modules = (Get-WebConfiguration //modules -PSPath iis:).collection ; \ $modules | foreach {if ($_.name -eq '"SolarWindsAPM"') { $_.attributes | select name, value}} ; ``` -------------------------------- ### Standalone Java Application with Java Agent Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/java/install This example demonstrates how to load the Java agent for a standalone Java application, such as a gRPC server or Spring Boot embedded web server, by adding the `-javaagent` parameter to the `java` command. ```java java -javaagent:/solarwinds-apm-agent.jar -jar your-standalone-app.jar ``` -------------------------------- ### Copy APM Agent Installer and Configuration Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/dotnet/install-windows-container These commands copy the SolarWinds APM .NET Agent installer executable and its configuration file (conf.inf) from the build context to the root of the C: drive on the target system. These files are prerequisites for the agent installation. ```dockerfile COPY ./SolarWindsAPM_DotNetAgent_Setup.exe c:/SolarWindsAPM_DotNetAgent_Setup.exe COPY ./conf.inf c:/conf.inf ``` -------------------------------- ### Start and Stop Database Monitor (PowerShell) Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-powershell-script-examples This snippet demonstrates how to start and stop a specific database monitor. It checks the current monitor state and issues the appropriate start or stop command via a REST API call. Includes a delay between operations and basic error handling. ```powershell $monitorURL = $baseURL + "databases/$databaseId/monitor-status" if ($monitor.monitorState -eq "Monitor Running") { $changeCommand = "STOP" $revertCommand = "START" } elif ($monitor.monitorState -eq "Monitor Stopped") { $changeCommand = "START" $revertCommand = "STOP" } Try { Write-Host "$changeCommand Monitor for database $databaseId..." $command = @{"command" = $changeCommand} | ConvertTo-Json $monitorJSON = Invoke-RestMethod -Method Put -Uri $monitorURL -Body $command -Headers $dpaHeader -TimeoutSec 60 $result = $monitorJSON.data Write-Host "Result: $result" Write-Host "Waiting 15 seconds...`r`n" Start-Sleep -s 15 Write-Host "$revertCommand Monitor for database $databaseId..." $command = @{"command" = $revertCommand} | ConvertTo-Json $monitorJSON = Invoke-RestMethod -Method Put -Uri $monitorURL -Body $command -Headers $dpaHeader -TimeoutSec 60 $result = $monitorJSON.data Write-Host "Result: $result" Write-Host "Waiting 15 seconds...`r`n" Start-Sleep -s 15 } Catch { handleError $Error[0] } ``` -------------------------------- ### Configure SolarWinds .NET Library using conf.inf Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/dotnet/install-windows-container This configuration file specifies the service key and APM collector endpoint for the SolarWinds Observability .NET Library. Ensure you replace placeholder values with your actual API token, service name, and collector endpoint. This method simplifies setup by centralizing configuration. ```ini [Setup] service_key=YourServiceKey apm_collector=YourSolarWindsApmCollectorEndpoint ``` -------------------------------- ### Tomcat 9 Service Configuration for Java Agent (Windows) Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/java/install This example shows how to set the JVM option for Tomcat 9 as a Windows service using the `tomcat9.exe` command with the `--JvmOptions` argument. Ensure the correct service name and paths are used. ```bash C:\apache-tomcat-9\bin>tomcat9.exe //US//Tomcat9 --JvmOptions="-javaagent:\solarwinds-apm-agent.jar" ``` -------------------------------- ### Start Monitoring Service (EPI Installation) Source: https://documentation.solarwinds.com/en/success_center/sqlsentry/content/administration/advanced/adding-the-sqlsentry-database-to-an-availability-group This command is used to start the SentryOne Monitoring Service(s) for an EPI (Event Processing Infrastructure) installation. It requires specifying the connection name of the listener. Ensure the 'so' command-line tool is accessible in your environment's PATH. ```bash so startms -n ag1-listener --all ``` -------------------------------- ### Example Ansible Playbook for Linux Installation Source: https://documentation.solarwinds.com/en/success_center/appoptics/content/kb/host_infrastructure/host_agent/installation_ansible A sample Ansible playbook demonstrating how to use the solarwinds.swisnap role on localhost with local connection for Linux systems. It specifies variable files for configuration, including the SolarWinds token. ```yaml - hosts: localhost connection: local vars_files: - vars/my_vars.yaml roles: - solarwinds.swisnap ``` -------------------------------- ### Start and Stop Database Monitoring (Python) Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-python-script-examples This snippet shows how to start and stop monitoring for all database instances using the SolarWinds API. It sends PUT requests with 'START' or 'STOP' commands and includes error handling for HTTP requests. Dependencies include the 'requests' and 'time' libraries. ```python # Start monitoring all database instances. monitor_url = f"{base_url}databases/monitor-status" try: print("*** Starting all Monitors ***") body = {"command": "START"} response = requests.put(monitor_url, json=body, headers=header, verify=verify_cert) response.raise_for_status() response_json = response.json() print(json.dumps(response_json["data"], indent=2)) print("Waiting 30 seconds...") time.sleep(30) except requests.exceptions.HTTPError as e: print(e) print(e.response.text) # Stop monitoring all database instances. try: print("*** Stopping all Monitors ***") body = {"command": "STOP"} response = requests.put(monitor_url, json=body, headers=header, verify=verify_cert) response.raise_for_status() response_json = response.json() print(json.dumps(response_json["data"], indent=2)) print("Waiting 30 seconds...") time.sleep(30) except requests.exceptions.HTTPError as e: print(e) print(e.response.text) ``` -------------------------------- ### Play Framework 2.4+ Production Mode Startup Script Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/java/install This snippet shows how to modify the startup script for a Play Framework 2.4+ application in production mode to include the Java agent. Ensure the `` is correctly set. ```bash bin/ -J-javaagent:/solarwinds-apm-agent.jar ``` -------------------------------- ### Locate Configuration Examples (Bash) Source: https://context7.com/context7/solarwinds/llms.txt This command recursively searches for 'config example' in markdown files within a specific directory of the SolarWinds documentation, displaying 5 lines after and 2 lines before each match. It's useful for finding configuration snippets. ```bash grep -r "config example" /app/repos/websites/solarwinds/en/Success_Center/ \ --include="*.md" -A 5 -B 2 ``` -------------------------------- ### Get All Installed Licenses Information via API Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-powershell-script-examples Retrieves information about all currently installed licenses and their allocation status (available vs. consumed) from the SolarWinds API. It performs a GET request and displays the data in a table format. Includes error handling. ```powershell $licenseURL = $baseURL + "databases/licenses/installed" Try { Write-Host "Getting Installed license information with total amounts available for use and total amounts used..." $licenseListJSON = Invoke-RestMethod -Method Get -Uri $licenseURL -Headers $dpaHeader -TimeoutSec 60 $licenseList = $licenseListJSON.data $licenseList | Format-Table -AutoSize } Catch { $_.Exception.ToString() } ``` -------------------------------- ### Example Usage: Start/Stop Task (curl) Source: https://documentation.solarwinds.com/en/success_center/appoptics/content/kb/host_infrastructure/host_agent/swisnap/rest_api Illustrates using curl to manage task lifecycles. Separate examples are provided for stopping and starting tasks, differentiating between v1 and v2 task handling. ```bash ## v2 curl -X PUT http://127.0.0.1:21413/v3/tasks/5908f536-091c-493e-9a39-b088480c6b1c?action=stop ## v1 curl -X PUT http://127.0.0.1:21413/v3/tasks/35bf2746-0e49-472e-97db-115c4ccb3b59?action=stop curl -X PUT http://127.0.0.1:21413/v3/tasks/35bf2746-0e49-472e-97db-115c4ccb3b59?action=start ``` -------------------------------- ### Get SolarWinds Installed License Information Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-powershell-script-examples Retrieves and displays the currently installed license information, including total amounts available and used. It uses Invoke-RestMethod to make a GET request to the SolarWinds API. Error handling is implemented using a Try-Catch block. ```powershell $licenseURL = $baseURL + "databases/licenses/installed" Try { Write-Host "Getting Installed license information with total amounts available for use and total amounts used..." $licenseListJSON = Invoke-RestMethod -Method Get -Uri $licenseURL -Headers $dpaHeader -TimeoutSec 60 $licenseList = $licenseListJSON.data $licenseList | Format-Table -AutoSize } Catch { handleError $Error[0] } ``` -------------------------------- ### Stop and Start Monitoring for All Database Instances (PowerShell) Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-powershell-script-examples Provides functionality to start or stop monitoring for all database instances simultaneously. It sends a PUT request with the appropriate command ('START' or 'STOP') to the DPA API. ```powershell $monitorURL = $baseURL + "databases/monitor-status" # Start monitoring all database instances. Try { Write-Host "Starting all Monitors..." $command = @{"command" = "START"} | ConvertTo-Json $monitorJSON = Invoke-RestMethod -Method Put -Uri $monitorURL -Body $command -Headers $dpaHeader -TimeoutSec 60 $result = $monitorJSON.data Write-Host "Result: $result" Write-Host "Waiting 30 seconds...`r`n" Start-Sleep -s 30 } Catch { $_.Exception.ToString() } # Stop monitoring all database instances. Try { Write-Host "Stopping all Monitors..." $command = @{"command" = "STOP"} | ConvertTo-Json $monitorJSON = Invoke-RestMethod -Method Put -Uri $monitorURL -Body $command -Headers $dpaHeader -TimeoutSec 60 $result = $monitorJSON.data Write-Host "Result: $result" Write-Host "Waiting 30 seconds...`r`n" Start-Sleep -s 30 } Catch { $_.Exception.ToString() } ``` -------------------------------- ### Install PostgreSQL system_stats Extension on Windows Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-register-postgresql-instance Installs the system_stats extension on Windows servers using Visual Studio. This involves downloading a zip file, extracting it, setting environment variables for include and library paths, and building the Visual Studio project. ```shell PG_INCLUDE_DIR=C:\\Program Files\\PostgreSQL\\12\\include PG_LIB_DIR=C:\\Program Files\\PostgreSQL\\12\\lib ``` -------------------------------- ### Install SolarWinds APM with Specific Version Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/services/python/install Installs a specific version of the solarwinds-apm Python library from PyPI. Replace `major.minor.patch` with the desired version numbers. ```bash pip install solarwinds-apm==major.minor.patch ``` -------------------------------- ### Search Documentation Content (Bash) Source: https://context7.com/context7/solarwinds/llms.txt This command searches for the word 'installation' recursively within all markdown files in the current directory and its subdirectories. It's useful for finding specific topics across documentation. ```bash grep -r "installation" . --include="*.md" ``` -------------------------------- ### Get Installed License Information (Python) Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-python-script-examples Retrieves information about currently installed licenses, including available and consumed quantities for different license categories. It makes a GET request to the license endpoint and formats the output for readability. Dependencies include the 'requests' library. ```python license_url = f"{base_url}databases/licenses/installed" try: print("\n*** Getting Installed license information with total amounts available for use and total amounts used ***") response = requests.get(license_url, headers=header, verify=verify_cert) response.raise_for_status() response_json = response.json() data = response_json["data"] print("licenseProduct licenseCategory licensesAvailable licensesConsumed") print("-------------- --------------- ----------------- ----------------") for i in range(len(data)): print('{:<15s}{:<16s}{:>17d}{:>17d}'.format(data[i]["licenseProduct"], data[i] ["licenseCategory"], data[i]["licensesAvailable"], data[i]["licensesConsumed"])) except requests.exceptions.HTTPError as e: print(e) print(e.response.text) ``` -------------------------------- ### Start and stop monitoring a database instance Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-powershell-script-examples Allows starting or stopping the monitoring status for a specific database instance using its ID. ```APIDOC ## PUT /websites/solarwinds/databases/{databaseId}/monitor-status ### Description Start and stop monitoring a database instance given its database ID. ### Method PUT ### Endpoint /websites/solarwinds/databases/{databaseId}/monitor-status ### Parameters #### Path Parameters - **databaseId** (integer) - Required - The ID of the database instance to control monitoring for. #### Request Body - **command** (string) - Required - The command to execute. Accepts "START" or "STOP". ### Request Example ```json { "command": "START" } ``` ### Response #### Success Response (200) - **result** (string) - The result of the operation (e.g., "SUCCESS"). #### Response Example ```json { "data": "SUCCESS" } ``` ``` -------------------------------- ### Example MySQL Configuration Snippet (JSON) Source: https://documentation.solarwinds.com/en/success_center/observability/content/configure/configure-database-mysql This is an example of a JSON configuration snippet for MySQL metric agent configuration. It demonstrates how to disable sampling and explains. ```json { "disable-sampling": "false", "enable-explains": "false" } ``` -------------------------------- ### Install PostgreSQL system_stats Extension via RPM (Linux) Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-register-postgresql-instance Installs the system_stats extension on Linux servers using an RPM package. This is a straightforward command-line installation process. Replace `_packageName_` with the actual downloaded RPM file name. ```shell rpm -ivh _packageName_ ``` -------------------------------- ### Get Installed License Information Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-python-script-examples Retrieves a list of all installed licenses, including details on availability and consumption. This function requires the base URL, headers, and certificate verification status. ```Python license_url = f"{base_url}databases/licenses/installed" try: print("*** Getting Installed license information with total amounts available for use and total amounts used ***") response = requests.get(license_url, headers=header, verify=verify_cert) response.raise_for_status() response_json = response.json() data = response_json["data"] print("licenseProduct licenseCategory licensesAvailable licensesConsumed") print("-------------- --------------- ----------------- ----------------") for i in range(len(data)): print('{:<15s}{:<16s}{:>17d}{:>17d}'.format(data[i]["licenseProduct"], data[i]["licenseCategory"], data[i]["licensesAvailable"], data[i]["licensesConsumed"])) except requests.exceptions.HTTPError as e: print(e) print(e.response.text) ``` -------------------------------- ### Get Annotations for Last 30 Days using Python Source: https://documentation.solarwinds.com/en/success_center/dpa/content/dpa-python-script-examples This example retrieves a list of annotations for a specific database instance within the last 30 days. It makes a GET request to the annotations endpoint with start and end time parameters. Requires the 'requests' and 'datetime' libraries, and an 'Authorization' header. ```python import requests import json import datetime # Assume base_url, header, verify_cert are defined elsewhere database_id = 1 annotation_url = f"{base_url}databases/{database_id}/annotations" # Dates are in ISO 8601 format ( 2018-12-31T12:00:00.000-07:00 ) end_time = datetime.datetime.now() start_time = end_time + datetime.timedelta(days=-30) args = {"startTime": start_time.astimezone().isoformat(), "endTime": end_time.astimezone().isoformat()} try: print("\n*** Getting Annotations for the last 30 days ***") response = requests.get(annotation_url, params=args, headers=header, verify=verify_cert) response.raise_for_status() response_json = response.json() print(json.dumps(response_json["data"], indent=2)) except requests.exceptions.HTTPError as e: print(e) print(e.response.text) ``` -------------------------------- ### SolarWinds Patch Manager: Get Help via CLI Source: https://documentation.solarwinds.com/en/success_center/patchman/content/spmag_advancedsetupcli Command to display onscreen instructions and help information for the `SetupHelper.exe` utility in SolarWinds Patch Manager. This is the first step to understanding available CLI arguments. ```batch setuphelper /? ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.