Ad Widget

Collapse

Init.d scripts for CentOS 4.x

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Init.d scripts for CentOS 4.x

    Hey everyone,

    I created init.d scripts for zabbix_agentd and zabbix_server that work with CentOS 4.x. They should also work with Whitebox Linux 4 and RHEL4.

    They can be found here:
    http://www.nowvox.com/contrib/zabbix/zabbix_server
    http://www.nowvox.com/contrib/zabbix/zabbix_agentd

    1. Copy them to /etc/rc.d/init.d/
    2. Run /sbin/chkconfig --add zabbix_agentd
    3. Run /sbin/chkconfig --add zabbix_server

    Feedback and suggestions are appreciated.
    Thanks

    #2
    Cool, i'll try them in the morning.


    Greetings
    EriSan
    Zabbix Certified Specialist

    Comment


      #3
      init.d scripts for centos 4.x

      I got this

      [[email protected] init.d]# /etc/init.d/zabbix_server start
      : bad interpreter: No such file or directory

      when trying to start after following your instrcutions. Is there something wrong with my bash? I changed the path to zabbix_server to /usr/bin
      Originally posted by NowVox
      Hey everyone,

      I created init.d scripts for zabbix_agentd and zabbix_server that work with CentOS 4.x. They should also work with Whitebox Linux 4 and RHEL4.

      They can be found here:
      http://www.nowvox.com/contrib/zabbix/zabbix_server
      http://www.nowvox.com/contrib/zabbix/zabbix_agentd

      1. Copy them to /etc/rc.d/init.d/
      2. Run /sbin/chkconfig --add zabbix_agentd
      3. Run /sbin/chkconfig --add zabbix_server

      Feedback and suggestions are appreciated.
      Thanks

      Comment


        #4
        Well, it seems the scripts are not working ok.

        Rebooting the server doesn't remove the pid files, and therefor zabbix won't start again after a reboot. (both server and agent)

        Any idea?

        Greetings
        EriSan
        Zabbix Certified Specialist

        Comment


          #5
          Originally posted by erisan500
          Well, it seems the scripts are not working ok.

          Rebooting the server doesn't remove the pid files, and therefor zabbix won't start again after a reboot. (both server and agent)

          Any idea?

          Greetings
          same for me (but i use different initscripts). I would really be interested in how to make the scripts work correctly...
          Big ZABBIX is watching you!
          (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)

          Comment


            #6
            Sorry for the delay, it's been a busy week. I think the issue with the pid file not being removed is that on my system I have the pid file in /tmp as per the installation instructions. The pid files get removed on my system during a reboot/restart. Is anyone else placing the pid file in /tmp or are you guys placing it in the more common /var/run directory? I'd prefer to have it in /var/run but placed it in /tmp because the installation docs said to.

            I'll take a look this weekend and post what I find. :-)

            Thanks for the feedback.

            Comment


              #7
              I don't think there is anything wrong with your BASH ( because if your BASH was borked you'd definitely know it ) Changing the path set in the $progdir variable in the init script should not affect anything ( unless zabbix_server and zabbix_agentd aren't installed there :-) ). Try changing the first line of the init scripts from #!/bin/bash to #!/bin/sh and then run the init scripts. I've made this change to the files hosted on my site as well.

              Let me know how it goes.
              -Thanks

              Originally posted by davewinter
              I got this

              [[email protected] init.d]# /etc/init.d/zabbix_server start
              : bad interpreter: No such file or directory

              when trying to start after following your instrcutions. Is there something wrong with my bash? I changed the path to zabbix_server to /usr/bin

              Comment


                #8
                Just to confirm, the script is working fine after i moved the pid file from /var/tmp to /tmp.

                thanks

                Greetings
                EriSan
                Zabbix Certified Specialist

                Comment


                  #9
                  Originally posted by davewinter
                  I got this

                  [[email protected] init.d]# /etc/init.d/zabbix_server start
                  : bad interpreter: No such file or directory

                  when trying to start after following your instrcutions. Is there something wrong with my bash? I changed the path to zabbix_server to /usr/bin
                  If the files are in dos format(CRLF), change them to unix format(LF) and try again

                  Comment

                  Announcement

                  Collapse
                  No announcement yet.
                  Working...
                  X