Downloads:

207,473

Downloads of v 1.14.3:

3,676

Last Update:

20 May 2020

Package Maintainer(s):

Software Author(s):

  • InfluxData

Tags:

admin telegraf influxdata influxdb

Telegraf (Install)

1.14.3 | Updated: 20 May 2020

Downloads:

207,473

Downloads of v 1.14.3:

3,676

Maintainer(s):

Software Author(s):

  • InfluxData

Telegraf (Install) 1.14.3

All Checks are Passing

2 Passing Test


Validation Testing Passed


Verification Testing Passed

Details

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:

>

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 telegraf -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 telegraf -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 telegraf installed
  win_chocolatey:
    name: telegraf
    state: present
    version: 1.14.3
    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 'telegraf' do
  action    :install
  version  '1.14.3'
  source   'STEP 3 URL'
end

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


Chocolatey::Ensure-Package
(
    Name: telegraf,
    Version: 1.14.3,
    Source: STEP 3 URL
);

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


cChocoPackageInstaller telegraf
{
   Name     = 'telegraf'
   Ensure   = 'Present'
   Version  = '1.14.3'
   Source   = 'STEP 3 URL'
}

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


package { 'telegraf':
  provider => 'chocolatey',
  ensure   => '1.14.3',
  source   => 'STEP 3 URL',
}

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


salt '*' chocolatey.install telegraf version="1.14.3" 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.

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

This package was approved as a trusted package on 21 May 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';

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

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

If (Get-Service -Name "telegraf" -ErrorAction SilentlyContinue) {
    & $fileLocation --service uninstall
}

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

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

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

  softwareName  = 'telegraf*'

  checksum       = '3ed4b00026012f3923e7fa328971bad28bb2684a51cf6d3bf9457d8513de11a2'
  checksumType   = 'sha256'
  checksum64     = '60710f610379bb15e326c59f7becbe0087ea59062236b9a947361fc5e01c10ed'
  checksumType64 = 'sha256'

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

Install-ChocolateyZipPackage @packageArgs
Install-ChocolateyInstallPackage @packageArgs

If (Test-Path "$env:ProgramFiles\telegraf\telegraf.backup.conf" -ErrorAction SilentlyContinue) {
  Move-Item -Force -Path "$env:ProgramFiles\telegraf\telegraf.backup.conf" -Destination "$env:ProgramFiles\telegraf\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
update.ps1
import-module au

$releases = 'https://portal.influxdata.com/downloads'

function global:au_SearchReplace {
   @{
        ".\tools\chocolateyInstall.ps1" = @{
            "(?i)(^[$]packageName\s*=\s*)('.*')"  = "`$1'$($Latest.PackageName)'"
            "(?i)(^[$]softwareName\s*=\s*)('.*')" = "`$1'$($Latest.PackageName)*'"
            "(?i)(^[$]url\s*=\s*)('.*')"          = "`$1'$($Latest.URL32)'"
            "(checksum\s*=\s*)('.*')"             = "`$1'$($Latest.Checksum32)'"
            "(?i)(^[$]url64\s*=\s*)('.*')"        = "`$1'$($Latest.URL64)'"
            "(checksum64\s*=\s*)('.*')"           = "`$1'$($Latest.Checksum64)'"
        }

        "$($Latest.PackageName).nuspec" = @{
            "(\<releaseNotes\>).*?(\</releaseNotes\>)" = "`${1}$($Latest.ReleaseNotes)`$2"
        }
    }
}

function global:au_GetLatest {
    $download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing

    $match = $download_page.Content | Select-String -Pattern '(https:.*telegraf.*\.zip)'
    $url = $match.Matches[0].value
    
    $version  = $url -split '[_-]|.zip' | Select-Object -Last 1 -Skip 3

    @{
        Version      = $version
        URL32        = $url -replace 'amd64','i386'
        URL64        = $url
        ReleaseNotes = 'https://github.com/influxdata/telegraf/blob/master/CHANGELOG.md'
    }
}

try {
    update -ChecksumFor all
} catch {
    $ignore = 'Unable to connect to the remote server'
    if ($_ -match $ignore) { Write-Host $ignore; 'ignore' }  else { throw $_ }
}

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.

Version Downloads Last Updated Status
Telegraf (Install) 1.14.2 7141 Thursday, April 30, 2020 Approved
Telegraf (Install) 1.14.1 4163 Wednesday, April 15, 2020 Approved
Telegraf (Install) 1.14.0 7366 Friday, March 27, 2020 Approved
Telegraf (Install) 1.13.4 12223 Wednesday, February 26, 2020 Approved
Telegraf (Install) 1.13.3 10732 Thursday, February 6, 2020 Approved
Telegraf (Install) 1.13.2 3098 Wednesday, January 22, 2020 Approved
Telegraf (Install) 1.13.1 7092 Thursday, January 9, 2020 Approved
Telegraf (Install) 1.13.0 13644 Friday, December 13, 2019 Approved
Telegraf (Install) 1.12.6 17863 Wednesday, November 20, 2019 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