Ad Widget

Collapse

Zabbix on FreeNAS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • afagund
    Junior Member
    • Feb 2018
    • 10

    #1

    Zabbix on FreeNAS

    Hi,

    Can someone help me understand the procedure below? I did not understand the section "under System - init/shutdown scripts". Where should that section be executed? Looks like something is missing or not well detailed.

    Join the friendly and open Zabbix community on our forums and social media platforms.


    Thanks!
    Andre
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    You need to say a bit with what you have problems to understand
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • afagund
      Junior Member
      • Feb 2018
      • 10

      #3
      I did not understand where those commands from that section should be executed. Is that on FreeNAS shell? If that is on FreeNAS, where that mount point and files comes from?

      Comment

      • LenR
        Senior Member
        • Sep 2009
        • 1005

        #4
        It looks like it wants you to put a config on some mount you create, then it will copy that to /etc/zabbix in each startup. This looks like the old startup/shutdown before service or systemd. I think you put things in the order you want them started.

        Maybe post the file for an example.

        Comment

        • kernbug
          Senior Member
          • Feb 2013
          • 330

          #5
          Originally posted by LenR
          This looks like the old startup/shutdown before service or systemd.

          Maybe post the file for an example.
          Nope, FreeNAS=FreeBSD, no systemd! From web-interface you can install only jail/pbi apps, but from the console view full freedom of the FreeBSD

          Login to the FreeNAS using SSH, open /usr/local/etc/pkg/repos/local.conf and set:
          Code:
          local: {
          url: «file:///usr/ports/packages»,
          enabled: false
          }
          Next find /usr/local/etc/pkg/repos/FreeBSD.conf:
          Code:
          FreeBSD: {
          enabled: yes
          }
          From now run pkg update:
          Code:
          Updating FreeBSD repository catalogue…
          FreeBSD repository is up to date.
          All repositories are up to date.
          Here you are, find zabbix (man pkg) and install!
          Another option to monitor FreeNAS using SNMP: https://share.zabbix.com/storage-devices/freenas-11
          Last edited by kernbug; 22-06-2018, 06:16.

          Comment


          • afagund
            afagund commented
            Editing a comment
            This procedure works great. Thanks kernbug!
        • afagund
          Junior Member
          • Feb 2018
          • 10

          #6
          I will test the procedure and will get back here with an update.

          Thanks!
          Andre Fagundes

          Comment

          • afagund
            Junior Member
            • Feb 2018
            • 10

            #7
            Here is the final procedure I followed. This works great on FreeNAS-11.1-U5. Just had issue with Zabbix template. I was not able to find a FreeNAS template which uses agent for monitoring - just SNMP. For that reason I am using the FreeBSD template, which gives a basic monitoring.

            ------------------------------------------------

            Login to the FreeNAS using SSH

            ------------------------------------------------

            vi /usr/local/etc/pkg/repos/local.conf

            local: {
            url: «file:///usr/ports/packages»,
            enabled: false
            }

            ------------------------------------------------

            vi /usr/local/etc/pkg/repos/FreeBSD.conf

            Code:
            FreeBSD: {
            enabled: yes
            }

            ------------------------------------------------

            pkg update

            ------------------------------------------------

            pkg seach zabbix

            ------------------------------------------------

            pkg install zabbix34-agent-3.4.8

            ------------------------------------------------

            vi /etc/rc.conf

            # Enable zabbix agent
            zabbix_agentd_enable="YES"

            ------------------------------------------------

            cp /etc/local/zabbix34/zabbix_agentd.conf.sample /etc/local/zabbix34/zabbix_agentd.conf

            ------------------------------------------------

            service -e | grep zabbix

            service zabbix_agentd start

            ------------------------------------------------

            vi /etc/local/zabbix34/zabbix_agentd.conf

            Server=<zabbix_server_ip>

            ------------------------------------------------

            Thanks!
            Andre Fagundes

            Comment

            • mykolaq
              Member
              • May 2015
              • 69

              #8
              and after update your zabbix agent will be purged. Use snmp template and dont worry. IMHO

              Comment

              • Weiss
                Junior Member
                • May 2019
                • 1

                #9
                After reboot FreeNAS zabbix_agent is mising.
                Pls help.

                Comment

                Working...