Truenas is an appliance, not a general-purpose Debian varient. While it may be possible using apt to install something like Telegraf it's not supported or recommended and may or may not work/break other things. Also the changes won't survive updates so you'd have to re-do them.
You can do what I do and run Telegraf in a docker container and mount the local system to it in read-only mode. This works the same as the local install.
Here's an example from my docker-compose.
Code:
telegraf:
image: telegraf:latest
networks:
t2_proxy:
pid: "host"
depends_on:
- influxdb2
container_name: telegraf
restart: on-failure:10
mem_limit: $MEM_LOW
cpus: $CPU_LOW
volumes:
- $APPDIR/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
#- /var/run/docker.sock:/var/run/docker.sock:ro
- /sys:/host/sys:ro
- /proc:/host/proc:ro
- /etc:/host/etc:ro
- /run:/host/run:ro
- /var:/host/var:ro
environment:
DOCKER_HOST: "tcp://socket-proxy:2375"
HOST_PROC: /host/proc
HOST_SYS: /host/sys
HOST_ETC: /host/etc
HOST_RUN: /host/run
HOST_VAR: /host/var
HOST_MOUNT_PREFIX: /host
labels:
- "com.centurylinklabs.watchtower.enable=true"
Note that it is custom to my system and variables so don't blindly copy and paste, this is just to give some pointers on how to do it. You don't have to use Compose, you can create your own docker container in the GUI. Also I'd check to see if the Truecharts folks have a Telegraf "app" available.