Ad Widget

Collapse

Set up agent on Solaris 11

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sph919
    Member
    • Jan 2019
    • 38

    #1

    Set up agent on Solaris 11

    Hi all,

    Having problem setting up a agent on Solaris 11. From RTFM and some google I've installed the agent from https://www.opencsw.org/packages/CSWzabbix-agent/
    From following the install instructions I get a print out of

    /etc/opt/csw/zabbix_agent.conf.CSW f cswpreserveconf 0644 root bin 2272 63346 1340696534 CSWzabbix-agent

    /etc/opt/csw/zabbix_agent.conf.d d none 0755 root bin CSWzabbix-agent

    /etc/opt/csw/zabbix_agentd.conf.CSW f cswpreserveconf 0644 root bin 5764 20316 1340696534 CSWzabbix-agent

    /etc/opt/csw/zabbix_agentd.conf.d d none 0755 root bin CSWzabbix-agent

    /opt/csw/bin/sparcv8plus/zabbix_get f none 0755 root bin 142284 55650 1340696530 CSWzabbix-agent

    /opt/csw/bin/sparcv8plus/zabbix_sender f none 0755 root bin 162080 44740 1340696530 CSWzabbix-agent

    /opt/csw/bin/sparcv9/zabbix_get f none 0755 root bin 166240 25256 1340696534 CSWzabbix-agent

    /opt/csw/bin/sparcv9/zabbix_sender f none 0755 root bin 190416 20703 1340696534 CSWzabbix-agent

    /opt/csw/bin/zabbix_get=/opt/csw/bin/isaexec l none CSWzabbix-agent

    /opt/csw/bin/zabbix_sender=/opt/csw/bin/isaexec l none CSWzabbix-agent

    /opt/csw/sbin/sparcv8plus/zabbix_agent f none 0755 root bin 432756 17550 1340696530 CSWzabbix-agent

    /opt/csw/sbin/sparcv8plus/zabbix_agentd f none 0755 root bin 497272 34563 1340696530 CSWzabbix-agent

    /opt/csw/sbin/sparcv9 d none 0755 root bin CSWzabbix-agent

    /opt/csw/sbin/sparcv9/zabbix_agent f none 0755 root bin 483816 12088 1340696534 CSWzabbix-agent

    /opt/csw/sbin/sparcv9/zabbix_agentd f none 0755 root bin 554752 37902 1340696534 CSWzabbix-agent

    /opt/csw/sbin/zabbix_agent=/opt/csw/bin/isaexec l none CSWzabbix-agent

    /opt/csw/sbin/zabbix_agentd=/opt/csw/bin/isaexec l none CSWzabbix-agent

    /opt/csw/share/doc/zabbix_agent d none 0755 root bin CSWzabbix-agent

    /opt/csw/share/doc/zabbix_agent/license f none 0644 root bin 17991 30402 1340697025 CSWzabbix-agent

    /opt/csw/share/man/man1 d none 0755 root bin CSWpkgutil CSWzabbix-agent

    /opt/csw/share/man/man1/zabbix_get.1 f none 0644 root bin 997 15578 1340696530 CSWzabbix-agent

    /opt/csw/share/man/man1/zabbix_sender.1 f none 0644 root bin 3274 22681 1340696530 CSWzabbix-agent

    /opt/csw/share/man/man8 d none 0755 root bin CSWzabbix-agent

    /opt/csw/share/man/man8/zabbix_agentd.8 f none 0644 root bin 911 10795 1340696530 CSWzabbix-agent
    I've change the configs to point at my zabbix server and changed the hostname.

    Looking at 'top' there is no service running for zabbix so have check svcs and there is not service either, and nothing in init.d. I have tried running svcadm enable zabbix-agent but get back ''zabbix-agent' doesn't match any instances'


    Is the agent set up like linux where you need to enable and start zabbix? Could anyone point me in the right direction?
  • c4t1nh4t
    Junior Member
    • Jan 2019
    • 1

    #2
    I've recently been working on getting Zabbix-agent working for our cluster of solaris 11.3 servers and found similar issues with opencsw package. I believe they stopped updating those several years ago.

    Your best bet is to go with the newest available source.
    Download sources from Git repository or ready-to-use Zabbix distributives


    base install of solaris 11.3 and I needed gcc and libpcre_dev packages before going further.

    pkg install gcc

    pkgadd -d http://get.opencsw.org/now
    /opt/csw/bin/pkgutil -U
    /opt/csw/bin/pkgutil -y -i libpcre_dev

    groupadd zabbix
    useradd -g zabbix zabbix


    untar the downloaded source
    ./configure --enable-agent
    make install

    updated the config file at /usr/local/etc/ as needed
    create log file/folder

    start agent
    /usr/local/sbin/zabbix_agentd -c /usr/local/etc/zabbix_agentd.conf

    add smf

    https://support.zabbix.com/browse/ZB...#comment-82910

    use xml file in that thread and update as needed

    Now, all this being said, I've come across an issue I'm unable to figure out at this point. The path to the pid in the config file is /var/run/zabbix/zabbix_agentd.pid
    you need to create the directory "zabbix" in /var/run/ , chown zabbix:zabbix (all done as root btw)

    I am able to start the agent and run without issues manually or through svcadm at this point. However, if the machine reboots, svcs is unable to write the pid to the location as the user has no permission to write to /var/run/ and the zabbix directory is no longer there (being that /var/run/ is ram)

    these are internal machines with no outside access so I've even tried adding the Zabbix Agent to root group with no luck. Work around was to have the pid in /tmp and it works perfectly fine. It might work for you as well. However, in my case, our cluster has a tmp clearing script that runs occasionally putting me in a bind. I'll continue to look for a solution for this but hope everything else helps you. Let me know if you have any questions and I'll try to answer to the best of my ability. This is my first time with zabbix (decades of nagios ) so maybe I made a mistake somewhere.
    Last edited by c4t1nh4t; 11-01-2019, 22:21.

    Comment

    • sph919
      Member
      • Jan 2019
      • 38

      #3
      Hi c4t1nh4t,

      Thanks that's really helps. Been pulling my hair out with this. Ill go through your steps. Yea in the same boat, moved away from ZenOS and re-learning everything haha. Thanks again

      Comment

      • sph919
        Member
        • Jan 2019
        • 38

        #4
        Solved my own problem so thought I would share it.

        Download the pre-compiled Zabbix agents from zabbix
        In my case it was zabbix_agents_3.2.0.solaris10.sparc.tar.gz (although its for Solaris 10 it will work on 11)
        1. Extract the files

        tar -xvzf zabbix_agents_3.2.0.solaris10.sparc.tar.gz
        You will have the following folders

        sbin/
        bin/
        conf/
        1. Now move the content of the files to there system folders eg

        mv /export/home/username/conf/zabbix_agentd.conf /etc/
        mv /export/home/username/conf/zabbix_agentd /etc/
        mv /export/home/username/bin/zabbix_sender /bin/
        mv /export/home/username/bin/zabbix_get /bin/
        mv /export/home/username/sbin/zabbix_agentd /sbin/
        1. Edit your zabbix_agentd.conf to point to your Zabbix server and add the host servers name.
        2. Now run : /sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf to start the agent
        3. Add it to your Zabbix server and your done.

        Note that the pre-compiled Zabbix agent for Solaris was not compiled without TLS support

        Also, as an option, or you can compile zabbix_agent from the source files: https://sourceforge.net/projects/zab...ar.gz/download.
        1. Install the required dependencies and gcc (gnu-compiler) + make.
        2. untar the source code
        3. Follow this manual: https://www.zabbix.com/documentation...zabbix_daemons

        ./configure --enable-agent
        The zabbix_sender, zabbix_get and zabbix_agentd + conf file will be place under the /usr/local/ directories.

        Comment

        Working...