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.
Join the DZone community and get the full member experience.Join For Free
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.
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.
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
tar -zxvf telegraf-solaris.tar.gz -C /tmp
Step 3: Create user and group that has the name
Step 4: Now copy the
/tmp/telegraf-solaris/opt/csw directory to your Solaris server's
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.
Step 9: Verify if the service is running.
Step 10: Use the below command to enable the service in every boot:
ln -s /etc/init.d/telegraf /etc/rc3.d/S93telegraf
Opinions expressed by DZone contributors are their own.