Downloads:

79,855

Downloads of v 4.2.185:

288

Last Update:

01 Apr 2015

Package Maintainer(s):

Software Author(s):

  • NewRelic

Tags:

newrelic-dotnet NewRelic dotnet .Net

New Relic .NET Agent

This is not the latest version of New Relic .NET Agent available.

4.2.185 | Updated: 01 Apr 2015

Downloads:

79,855

Downloads of v 4.2.185:

288

Software Author(s):

  • NewRelic

New Relic .NET Agent 4.2.185

This is not the latest version of New Relic .NET Agent available.

All Checks are Unknown

2 Test of Unknown Status


Validation Testing Unknown


Verification Testing Unknown

To install New Relic .NET Agent, run the following command from the command line or from PowerShell:

>

To upgrade New Relic .NET Agent, run the following command from the command line or from PowerShell:

>

To uninstall New Relic .NET Agent, run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade newrelic-dotnet -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade newrelic-dotnet -y --source="'STEP 3 URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure newrelic-dotnet installed
  win_chocolatey:
    name: newrelic-dotnet
    state: present
    version: 4.2.185
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'newrelic-dotnet' do
  action    :install
  version  '4.2.185'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: newrelic-dotnet,
    Version: 4.2.185,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller newrelic-dotnet
{
   Name     = 'newrelic-dotnet'
   Ensure   = 'Present'
   Version  = '4.2.185'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'newrelic-dotnet':
  provider => 'chocolatey',
  ensure   => '4.2.185',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install newrelic-dotnet version="4.2.185" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved as a trusted package on 01 Apr 2015.

Description

New Relic .NET Agent that allows you to monitor your .NET application. Package has following parameters:

-param 'license_key=newrelic_key' # Specify Your NewRelic license key
-param 'restartiis=true' # (Optional) Stop IIS service, install package, start IIS after.
-param 'license_key=your_key;restartiis=true' # Specify License key and handle IIS restarts.

This package is updated automatically to use new url when a new version comes out.

tools\chocolateyInstall.ps1
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one

#Items that could be replaced based on what you call chocopkgup.exe with
#newrelic-dotnet - Package Name (should be same as nuspec file and folder) |/p
#4.2.185 - The updated version | /v
#http://download.newrelic.com/dot_net_agent/release/NewRelicAgent_x86_4.2.185.0.msi - The url for the native file | /u
#c:\ProgramData\Chocolatey\_work\NewRelicAgent_x86_4.1.136.0.msi - Downloaded file if including it in package | /pp
# - This will be used later | /pg
#http://download.newrelic.com/dot_net_agent/release/NewRelicAgent_x64_4.2.185.0.msi - The 64bit url for the native file | /u64

$packageName = 'newrelic-dotnet' # arbitrary name for the package, used in messages
$installerType = 'msi' #only one of these: exe, msi, msu
$url = 'http://download.newrelic.com/dot_net_agent/release/NewRelicAgent_x86_4.2.185.0.msi' # download url
$url64 = 'http://download.newrelic.com/dot_net_agent/release/NewRelicAgent_x64_4.2.185.0.msi' # 64bit URL here or remove - if installer decides, then use $url
$silentArgs = '/qb INSTALLLEVEL=50' # "/s /S /q /Q /quiet /silent /SILENT /VERYSILENT" # try any of these to get the silent installer #msi is always /quiet
$validExitCodes = @(0) #please insert other valid exit codes here, exit codes for ms http://msdn.microsoft.com/en-us/library/aa368542(VS.85).aspx

# Defaults
$restartiis = $false





if (![string]::IsNullOrEmpty($env:chocolateyPackageParameters))
{
	if ($env:chocolateyPackageParameters.ToLower().Contains("restartiis") -or $env:chocolateyPackageParameters.ToLower().Contains("license_key"))
	{		
		# Getting Parameters
		$rawTxt =  [regex]::escape($env:chocolateyPackageParameters)
		$params = $($rawTxt -split ';' | ForEach-Object {
		   $temp= $_ -split '='
		   "{0}={1}" -f $temp[0].Substring(0,$temp[0].Length),$temp[1]
		} | ConvertFrom-StringData)


		if ($params.restartiis -eq 'true')
		{			
			Write-Host "Found 'restartiis' parameter enabled."
			$restartiis = $true
			
		}
		else
		{
			$restartiis = $false
		}
		
		if (![string]::IsNullOrEmpty($params.license_key))
		{				
			# Passing License key
			$silentArgs = $silentArgs + " NR_LICENSE_KEY=" + $params.license_key			
		}
		else
		{
			Write-Warning "No New Relic license key specified. Please use -params 'license_key=<newrelic_key>' or alternatively specify it manually after installation."
		}
	}
	else
	{
		Write-Warning "No New Relic license key specified. Please use -params 'license_key=<newrelic_key>' or alternatively specify it manually after installation."
	}
}
else
{
	Write-Warning "No New Relic license key specified. Please use -params 'license_key=<newrelic_key>' or alternatively specify it manually after installation."
}



try { #error handling is only necessary if you need to do anything in addition to/instead of the main helpers
  
	if ($restartiis)
	{
	  # Stop IIS before installing
	  $ServiceName = "W3SVC"
	  $service = Get-Service "$ServiceName" -ErrorAction SilentlyContinue
		if ($service -ne $null)
		{
			
				Write-Host $($ServiceName+" service will be stopped")

				Stop-Service $ServiceName
				 
				echo "Sleeping for $sleep_timeout seconds"	
				
				$i = 0
				while (!(Get-Service $ServiceName | Where-Object {$_.status -eq "stopped"}))
				{	
					
					echo "Waiting for ${ServiceName} to be stopped"		
					if ($i -gt $sleep_timeout)
					{
						throw "Can't wait for ${ServiceName} to be stopped. Took longer than ${sleep_timeout}s: Timeout"
					}
					Echo "[$i]"
					Start-Sleep -s 1
					$i++
				}
				echo "${ServiceName} is stopped. Continue."
				
				Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" "$url64"  -validExitCodes $validExitCodes
				
				Write-Host "Configuring $ServiceName to autostart"
				
				Set-Service $ServiceName -startuptype "auto"
				
				Write-Host $("Starting "+$ServiceName+" service")
				Start-Service $ServiceName
		}
		else
		{	
			echo "No ${ServiceName} service found. Nothing to restart. Continue."
			Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" "$url64"  -validExitCodes $validExitCodes
		}
	}
	else
	{	
		Write-Warning "IIS will not be restarted. Please do so manually. In order to stop & start IIS automatically use parameter: -params 'restartiis=true'. "		
		Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" "$url64"  -validExitCodes $validExitCodes
	}
  
} catch {
  Write-ChocolateyFailure "$packageName" "$($_.Exception.Message)"
  throw
}
tools\chocolateyUninstall.ps1
$packageName = 'newrelic-dotnet' # arbitrary name for the package, used in messages

try {

  # http://stackoverflow.com/questions/450027/uninstalling-an-msi-file-from-the-command-line-without-using-msiexec
  $msiArgs = "/X {1E9129D9-6FFB-4223-A6CC-E6D7BC21C38C} /qb"
  
  Start-ChocolateyProcessAsAdmin "$msiArgs" 'msiexec'

  Write-ChocolateySuccess $package
} catch {
  Write-ChocolateyFailure $package "$($_.Exception.Message)"
  throw
}

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
New Relic .NET Agent 8.20.262.0 3527 Thursday, October 17, 2019 Approved
New Relic .NET Agent 8.19.353.0 2918 Tuesday, October 1, 2019 Approved
New Relic .NET Agent 8.18.241.0 4418 Monday, August 26, 2019 Approved
New Relic .NET Agent 8.17.438.0 2230 Monday, July 22, 2019 Approved
New Relic .NET Agent 8.16.567.0 1907 Tuesday, June 11, 2019 Approved
New Relic .NET Agent 8.15.455.0 1481 Monday, April 22, 2019 Approved
New Relic .NET Agent 8.14.222.0 884 Tuesday, March 19, 2019 Approved
New Relic .NET Agent 8.13.798.0 1649 Tuesday, February 12, 2019 Approved
New Relic .NET Agent 8.12.216.0 681 Thursday, January 10, 2019 Approved

This package has no dependencies.

Discussion for the New Relic .NET Agent Package

Ground Rules:

  • This discussion is only about New Relic .NET Agent and the New Relic .NET Agent package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or New Relic .NET Agent, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus