Ad Widget

Collapse

How can I disable the output of ip or hostname to external scripts ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fableman
    Member
    • Oct 2007
    • 78

    #1

    How can I disable the output of ip or hostname to external scripts ?

    I need to make a script that need 2 inputs X and Y

    But the outpout my external scrips get is 0.0.0.0 X Y

    I really need the external script not to output the 0.0.0.0 to my external script.

    Why not just let zabbix output things exactly as its typed within the [] and force people to use {HOSTNAME} or {IP} if they need hostname or IP to there scripts?

    Solution is to ignore the $1 but kinda bad solution if ya using script for other solutions.
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    you might register the request to omit ip/dns in the zabbix feature request tracker
    Zabbix 3.0 Network Monitoring book

    Comment

    • fableman
      Member
      • Oct 2007
      • 78

      #3
      From start of zabbix the design should have been to execute anything in the [] as it is and then force people to use {IP} or {HOSTNAME} then it would be plain and simple to understand and remove lots of confusions regarding external scripts.

      Iam sure moste of the users of zabbix use it onlyl for network related stuff, but I have done soo many other stuff with it.

      My latest effort is a system to keep track of Stocks and give alarm when to sell or buy



      It's not possible to add requests or bug report if you don't have a login for paid support page.

      Soo I can't put up a regest for this function.
      Last edited by fableman; 12-10-2010, 08:21.

      Comment

      • alixen
        Senior Member
        • Apr 2006
        • 474

        #4
        Hi,

        Originally posted by fableman
        Iam sure moste of the users of zabbix use it onlyl for network related stuff, but I have done soo many other stuff with it.

        My latest effort is a system to keep track of Stocks and give alarm when to sell or buy
        I also have external scripts that are not network related.
        Just ignoring first argument is not that difficult.
        If you already have a program and you can't change its parameter list, you can write a small shell wrapper that will remove first parameter (I use wrappers to call Nagios plugins from zabbix).

        Originally posted by fableman
        It's not possible to add requests or bug report if you don't have a login for paid support page.

        Soo I can't put up a regest for this function.
        You can register without paying anything.
        However, if you fill a bug report for that I will probably comment against implementing that.
        Changing the way Zabbix calls external scripts is not backwards compatible and will break all systems already in production.

        Regards,
        Alixen
        http://www.alixen.fr/zabbix.html

        Comment

        • fableman
          Member
          • Oct 2007
          • 78

          #5
          Originally posted by alixen
          Hi,



          I also have external scripts that are not network related.
          Just ignoring first argument is not that difficult.
          If you already have a program and you can't change its parameter list, you can write a small shell wrapper that will remove first parameter (I use wrappers to call Nagios plugins from zabbix).



          You can register without paying anything.
          However, if you fill a bug report for that I will probably comment against implementing that.
          Changing the way Zabbix calls external scripts is not backwards compatible and will break all systems already in production.

          Regards,
          Alixen
          Sure its easy to workaround but why produce more CPU load and disk load when not needed, Iam talking about huge systems with hundreds of hosts this will be a problem.

          And still I can't find where to suggest anything.
          BTW. It's not a bug I want to request a feature soo we can turn it on/off.

          Another thing is if I use {HOSTNAME} why send it two times then ?

          #example.
          [hostname.com 123 123 -j {HOSTNAME}]
          =
          hostname.com 123 123 -j hostname.com
          #
          I have a hard time to understand this kind of logic.


          (Still I belive the function create lots of problems, cos the information is not easy to find. I seen lots of topic regaring externalscript and problems during the years and lots of the confusions are regarding to a bad inplementation from start and poor documentation around external scripts, if you ask me.)

          Sorry if I sound abit negg here, Iam not, just that I been away from zabbix for 1.5 years and when I got back, the first thing I hade problems with was how zabbix is handling external scripts and I got some memory flash backs and searched the forusm and then I remember how much problems I hade trying external scripts first time with zabbix. External scripts in Zabbix need some loving from the develop team to make the function better and more easy to use and understand.)

          Comment

          • richlv
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Oct 2005
            • 3112

            #6
            Originally posted by fableman
            And still I can't find where to suggest anything.
            BTW. It's not a bug I want to request a feature soo we can turn it on/off.
            you can register on the tracker. then file this one on the ZBXNEXT project, which holds feature request.

            and yeah, there should be a switch which controls this behaviour for backwards compatiblity
            Zabbix 3.0 Network Monitoring book

            Comment

            • fableman
              Member
              • Oct 2007
              • 78

              #7
              Originally posted by richlv
              you can register on the tracker. then file this one on the ZBXNEXT project, which holds feature request.

              and yeah, there should be a switch which controls this behaviour for backwards compatiblity
              Thanks,,, now added.

              Comment

              Working...