Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Install Telegraf on Solaris

DZone's Guide to

How to Install Telegraf on Solaris

Learn how to get started with this open source data collection, processing, and aggregation tool, based on Go, onto a Solaris operating system.

· Big Data Zone ·
Free Resource

Hortonworks Sandbox for HDP and HDF is your chance to get started on learning, developing, testing and trying out new features. Each download comes preconfigured with interactive tutorials, sample data and developments from the Apache community.

Telegraf is extremely powerful and one of the fastest adopted tools in the world for collecting, processing, and aggregating different metrics. It’s open source and written in the Go language.

Telegraf is not off-the-shelf supported by the Solaris 10 and 11 operating systems. We would need to compile Telegraf agents from customized source-code for the Solaris operating system.

Prerequisites

For the purpose of compilation, we would need gccgo (>=5.5.0) installed on the server with a few other libraries.

Installation Procedure for Telegraf Agent

Step 1: Download the latest release tar. Example command below.

wget https://github.com/vikramjakhr/telegraf-solaris/releases/download/v1.0.0/telegraf-solaris.tar.gz


Step 2: Extract the tar downloaded in step 1 in the /tmp directory by executing the below command. It will create a directory named telegraf-solaris in /tmp.

tar -zxvf telegraf-solaris.tar.gz -C /tmp


Step 3: Create user and group that has the name telegraf.

useradd telegraf


Step 4: Now copy the /tmp/telegraf-solaris/opt/csw directory to your Solaris server's /opt directory:

cp -r /tmp/telegraf-solaris/opt/csw /opt


Step 5: Copy telegraf binary and give it execute permission.

cp /tmp/telegraf-solaris/bin/telgraf /usr/bin/telgraf; chmod +x /usr/bin/telgraf


Step 6: Copy the Telegraf  init.d start/stop script:

cp /tmp/telegraf-solaris/script/telegraf /etc/init.d/telegraf ; chmod +x /etc/init.d/telegraf


Step 7: Create the Telegraf conf directory, /etc/telegraf, and the Telegraf conf file.

mkdir /etc/telegraf
cp /tmp/telegraf-solaris/conf/telegraf.conf /etc/telegraf/telegraf.conf


Step 8: Start the Telegraf service.

/etc/init.d/telegraf start


Step 9: Verify if the service is running.

/etc/init.d/telegraf status


Step 10: Use the below command to enable the service in every boot:

ln -s /etc/init.d/telegraf /etc/rc3.d/S93telegraf

Hortonworks Community Connection (HCC) is an online collaboration destination for developers, DevOps, customers and partners to get answers to questions, collaborate on technical articles and share code examples from GitHub.  Join the discussion.

Topics:
telegraf ,solaris ,go ,tutorial ,devops

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}