Downloads:

1,329,954

Downloads of v 1.15.3:

33,962

Last Update:

12 Sep 2020

Package Maintainer(s):

Software Author(s):

  • InfluxData

Tags:

admin telegraf influxdata influxdb

Telegraf (Install)

This is not the latest version of Telegraf (Install) available.

  • 1
  • 2
  • 3

1.15.3 | Updated: 12 Sep 2020

Downloads:

1,329,954

Downloads of v 1.15.3:

33,962

Maintainer(s):

Software Author(s):

  • InfluxData

  • 1
  • 2
  • 3
Telegraf (Install) 1.15.3

This is not the latest version of Telegraf (Install) available.

  • 1
  • 2
  • 3

Some Checks Have Failed or Are Not Yet Complete

Not All Tests Have Passed


Validation Testing Passed


Verification Testing Passed

Details

Scan Testing Resulted in Flagged:

This package was submitted (and approved) prior to automated virus scanning integration into the package moderation processs.

We recommend clicking the "Details" link to make your own decision on installing this package.

Details
Learn More

Deployment Method: Individual Install, Upgrade, & Uninstall

To install Telegraf (Install), run the following command from the command line or from PowerShell:

>

To upgrade Telegraf (Install), run the following command from the command line or from PowerShell:

>

To uninstall Telegraf (Install), run the following command from the command line or from PowerShell:

>

Deployment Method:

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

1. Enter Your Internal Repository Url

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


2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • 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://community.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. Copy Your Script

choco upgrade telegraf -y --source="'INTERNAL REPO URL'" --version="'1.15.3'" [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 telegraf -y --source="'INTERNAL REPO URL'" --version="'1.15.3'" 
$exitCode = $LASTEXITCODE

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

Exit $exitCode

- name: Install telegraf
  win_chocolatey:
    name: telegraf
    version: '1.15.3'
    source: INTERNAL REPO URL
    state: present

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


chocolatey_package 'telegraf' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '1.15.3'
end

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


cChocoPackageInstaller telegraf
{
    Name     = "telegraf"
    Version  = "1.15.3"
    Source   = "INTERNAL REPO URL"
}

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


package { 'telegraf':
  ensure   => '1.15.3',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',
}

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


4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

Private CDN cached downloads available for licensed customers. Never experience 404 breakages again! Learn more...

This package was approved as a trusted package on 12 Sep 2020.

Description

Telegraf is a plugin-driven server agent for collecting and reporting
metrics, and is the first piece of the TICK stack. Telegraf has plugins to source a
variety of metrics directly from the system it’s running on, pull metrics from third
party APIs, or even listen for metrics via a statsd and Kafka consumer services. It
also has output plugins to send metrics to a variety of other datastores, services,
and message queues, including InfluxDB, Graphite, OpenTSDB, Datadog, Librato, Kafka,
MQTT, NSQ, and many others.

Telegraf is installed under %ProgramFiles%\telegraf.


tools\chocolateybeforemodify.ps1
If (Get-Service -Name "telegraf" -ErrorAction SilentlyContinue) {
    Stop-Service -Name "telegraf"
}
tools\chocolateyinstall.ps1
$ErrorActionPreference = 'Stop';

$unzipFolder    = $env:ProgramFiles
$installFolder  = "$unzipFolder\telegraf"
$configDirectory = Join-Path $installFolder 'telegraf.d'
$packageName     = 'telegraf'
$softwareName    = 'telegraf*'
$toolsDir        = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url             = 'https://dl.influxdata.com/telegraf/releases/telegraf-1.15.3_windows_i386.zip'
$url64           = 'https://dl.influxdata.com/telegraf/releases/telegraf-1.15.3_windows_amd64.zip'
$fileLocation    = Join-Path $installFolder 'telegraf.exe'
$telegrafRegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\EventLog\Application\telegraf"

# Extract current version of telegraf
$versionSearch = $url -match '.*-(\d*\.\d*\.\d*)_.*'
if ($versionSearch) {
  $version = $matches[1]
}

If(!(Test-Path -Path $configDirectory)){
  New-Item -Path $configDirectory -ItemType Directory
}

If (Get-Service -Name "telegraf" -ErrorAction SilentlyContinue) {
  $servicePath = (Get-WmiObject win32_service | ?{$_.Name -like 'telegraf'}).PathName.Split('--')[0].Trim().Replace("""","")
  & $servicePath --service uninstall
}

If (Test-Path $telegrafRegPath) {
  Remove-Item $telegrafRegPath -Force
}

If (Test-Path "$installFolder\telegraf.conf" -ErrorAction SilentlyContinue) {
  Copy-Item -Force -Path "$installFolder\telegraf.conf" -Destination "$installFolder\telegraf.backup.conf"
}

$packageArgs = @{
  packageName   = $packageName
  unzipLocation = $unzipFolder
  fileType      = 'EXE'
  url           = $url
  url64bit      = $url64
  file          = $fileLocation
  file64        = $fileLocation

  softwareName  = 'telegraf*'
  
  checksum       = '770b799c7778637bb8bf93a521d6fd8bce6b067ad93fa866215674e4edbaf22f'
  checksumType   = 'sha256'
  checksum64     = 'c1f772430fa3a108d168efe1a9200a18c95da1598f6b8b0c12912304a318205c'
  checksumType64 = 'sha256'

  silentArgs     = "--config-directory `"$configDirectory`" --service install"
  validExitCodes= @(0)
}

Install-ChocolateyZipPackage @packageArgs

# Move files to non versioned telegraf folder
If((Test-Path -Path "$installFolder-$version")){
  Write-Host "Moving telegraf files"
  Move-Item -Force -Path "$installFolder-$version\*" -Destination "$installFolder\"
  Remove-Item -Path "$installFolder-$version" -Recurse -Force
}

Install-ChocolateyInstallPackage @packageArgs

If (Test-Path "$installFolder\telegraf.backup.conf" -ErrorAction SilentlyContinue) {
  Move-Item -Force -Path "$installFolder\telegraf.backup.conf" -Destination "$installFolder\telegraf.conf"
  Restart-Service -Name "telegraf"
}

tools\chocolateyuninstall.ps1
$ErrorActionPreference = 'Stop';

$packageName = 'telegraf'
$softwareName = 'telegraf*'
$installerType = 'EXE'
$install_folder = Join-Path $env:ProgramFiles 'telegraf'

$silentArgs = '--service uninstall'
$validExitCodes = @(0)

$uninstalled = $false

$file = Join-Path $install_folder 'telegraf.exe'

Uninstall-ChocolateyPackage -PackageName $packageName `
                            -FileType $installerType `
                            -SilentArgs "$silentArgs" `
                            -ValidExitCodes $validExitCodes `
                            -File "$file"

Start-Sleep -Seconds 3
Remove-Item -Path $install_folder -Recurse -Confirm:$false -Force

Log in or click on link to see number of positives.

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.

Add to Builder Version Downloads Last Updated Status
Telegraf (Install) 1.23.2 195045 Tuesday, July 12, 2022 Approved
Telegraf (Install) 1.23.1 80100 Wednesday, July 6, 2022 Approved
Telegraf (Install) 1.23.0 118166 Tuesday, June 14, 2022 Approved
Telegraf (Install) 1.22.4 85537 Wednesday, May 18, 2022 Approved
Telegraf (Install) 1.22.3 13 Wednesday, May 18, 2022 Approved
Telegraf (Install) 1.22.2 12 Wednesday, May 18, 2022 Approved
Telegraf (Install) 1.22.1 39020 Sunday, April 17, 2022 Approved
Telegraf (Install) 1.22.0 18 Sunday, April 17, 2022 Approved
Telegraf (Install) 1.21.4 40731 Thursday, February 17, 2022 Approved

This package has no dependencies.

Discussion for the Telegraf (Install) Package

Ground Rules:

  • This discussion is only about Telegraf (Install) and the Telegraf (Install) 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 Telegraf (Install), 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