Compile zabbix_agentd for FreeNAS-9.3-STABLE-201602031011

Status
Not open for further replies.

jsylvia007

Explorer
Joined
Oct 4, 2011
Messages
84
Howdy All!

I'm currently running version 2.0.3 of Zabbix_AgentD. I'd really like to get it to version 2.4.x if at all possible.

Sometime ago someone compiled that version for me, as I'm not really sure how to compile that specific binary to work with FreeNAS.

I tried the guide on the Zabbix Wiki, but the version listed there doesn't work with 9.3 for some reason.

Any help would be appreciated.
 
D

dlavigne

Guest
Zabbix 2.4.7 is available as a FreeBSD package/port which can be installed using the instructions in sections 13.2.2 or 13.2.3 of the Guide. Personally, I would create a second jail to install the newer software into, test that it works as expected, then delete the old jail when finished.
 

jsylvia007

Explorer
Joined
Oct 4, 2011
Messages
84
Zabbix 2.4.7 is available as a FreeBSD package/port which can be installed using the instructions in sections 13.2.2 or 13.2.3 of the Guide. Personally, I would create a second jail to install the newer software into, test that it works as expected, then delete the old jail when finished.

So if I understand jails correctly, that won't help, because I need access to the actual hardware of the FreeNAS box. Currently, I have a post-init script that starts the agent. The agent and config file are just resident on one of my pools.
 
D

dlavigne

Guest
I assume they copied them post-install from a jail (or another system). I can't think of any other way to get them on the pool...
 

jsylvia007

Explorer
Joined
Oct 4, 2011
Messages
84
So... I added a jail, installed the client, copied it where my existing one is, AND... FAIL.

I get: Shared object "libiconv.so.2" not found, required by "zabbix_agentd"

Any help with this? I'm not sure how to tell zabbix_agentd where to look for this file. I tried copying it into the same directory, same problem... I also tried setting the PATH, and that didn't work either.
 
D

dlavigne

Guest
This should fix it: pkg install libiconv . If it complains, try pkg install -f libiconv .
 

jsylvia007

Explorer
Joined
Oct 4, 2011
Messages
84
This should fix it: pkg install libiconv . If it complains, try pkg install -f libiconv .

I assume that would require messing this the base install meaning I'd lose those changes if I flash an update. That's what I'm trying to avoid.
 
D

dlavigne

Guest
I assumed you would also compile that in a jail and copy it over...
 

jsylvia007

Explorer
Joined
Oct 4, 2011
Messages
84
I assumed you would also compile that in a jail and copy it over...

I tried exactly that... I copied it into the same directory of the zabbix_agentd executable, I attempted to add that directory to the PATH statement, nothing, still results in that same error.
 

jsylvia007

Explorer
Joined
Oct 4, 2011
Messages
84
So not sure if anyone cares, BUT, this now works on FreeNAS 9.10 with Zabbix_Agentd v2.4.7

If people are interested on my setup, I can explain how it works, but it persists an upgrade, and reports all the required information.

Attached is the binary that I know works.
 

Attachments

  • zabbix_agentd.zip
    105.1 KB · Views: 243

-Mael-

Dabbler
Joined
Mar 26, 2016
Messages
17
So not sure if anyone cares, BUT, this now works on FreeNAS 9.10 with Zabbix_Agentd v2.4.7

If people are interested on my setup, I can explain how it works

I'd love to know how this works.
 

jsylvia007

Explorer
Joined
Oct 4, 2011
Messages
84
Surely!

Here's how I got it to work...

First, I created a folder on one of my pools. For this example, let's say that the path is: "/mnt/FILESTORE/BACKUP/Scripts/Zabbix/".

I then found and extracted a compatible version of zabbix-agentd. This was the hard part. I've included my version here so that you don't have to find it.

Extract the attached file to your storage location. Then you'll need to change config entries in the config file.

At a minimum you'll need to change:

1. LogFile=
2. Server=
3. ServerActive=
4. Hostname=

You'll then likely need to chmod +x the zabbix_agentd file.

Now... Once you make the changes, you can see if it works by this command line:

/mnt/FILESTORE/BACKUP/Scripts/Zabbix/zabbix_agentd -c /mnt/FILESTORE/BACKUP/Scripts/Zabbix/zabbix_agentd.conf

For some reason you need to put the FULL path to both files.

If that works... Then you can add the startup script:

In the FreeNAS gui, expand Tasks, then Init/Shutdown Scripts. Click "Add Init/Shutdown Script". In the new window, the Type is "Command", the Command is:

/mnt/FILESTORE/BACKUP/Scripts/Zabbix/zabbix_agentd -c /mnt/FILESTORE/BACKUP/Scripts/Zabbix/zabbix_agentd.conf

and When, is Post Init

That should be most of what you need to do. Give it a shot and let me know if you need anything more.
 

Attachments

  • zabbix_agentd.tar.gz
    122.5 KB · Views: 235

-Mael-

Dabbler
Joined
Mar 26, 2016
Messages
17
Thank you. This is very helpful.
 
Status
Not open for further replies.
Top