Ad Widget

Collapse

External checks and API slow work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • respect
    Junior Member
    • Sep 2017
    • 13

    #1

    External checks and API slow work

    Hi,

    I got stuck in the problem:
    I have server 4.0.5 and three proxies, each of them uses external scripts working with API.
    Now timeout exceeds for all of them and they become unsupported. And I see that the number of log in to API is not equal the number of log off. So even if I run the external script manually it runs for 120-130 seconds because of the problem with API. The current value of the timeout is 20. When I set 30 I got an increasing of zabbix queue.
    i can't imagine where to dig further.
    Please give a hint
  • respect
    Junior Member
    • Sep 2017
    • 13

    #2
    Originally posted by splitek
    Maybe you should use zabbix_send utility.
    The external check creates items and triggers of the software defined storage.
    I don't understand how to replace the script working with API to zabbix_sender utility.
    In all cases I need API.
    Something that I found is - https://zabbix.org/wiki/Escaping_timeouts_with_atd
    Maybe somebody has such experience?

    Comment

    • vso
      Zabbix developer
      • Aug 2016
      • 190

      #3
      I think what is meant is that you create trapper item and execute your script as a separate program and when your script has the result it will use zabbix sender to send in a value. But I would also look into why api is slow what kind of request is slow?

      Comment

      • respect
        Junior Member
        • Sep 2017
        • 13

        #4
        Originally posted by vso
        I think what is meant is that you create trapper item and execute your script as a separate program and when your script has the result it will use zabbix sender to send in a value. But I would also look into why api is slow what kind of request is slow?
        1. I understand the use cases of zabbix_sender. I use it a lot to send bulks of items. But at the current time the necessity is to check our software defined storage, find the created new objects and based on that create new objects or delete old objects in Zabbix.
        2. I checked the audit log in Zabbix and see that I have more log on actions of the user that runs the scripts than log off,
        also I see that my external check is often becomes unsupported in Zabbix. After that I found the table Sessions at the DB server and realized that I have up to 1 billion rows in this table. This table is becoming bigger and bigger.
        It looks like the room with no exit.

        Comment

        • vso
          Zabbix developer
          • Aug 2016
          • 190

          #5
          Please check known issues https://www.zabbix.com/documentation...n/known_issues

          API login

          A large number of open user sessions can be created when using custom scripts with the user.login method without a following user.logout.
          Last edited by vso; 09-09-2019, 16:21.

          Comment

          • respect
            Junior Member
            • Sep 2017
            • 13

            #6
            Originally posted by vso
            yeah, I know about it and use logout method in the scripts.
            I guess the script logs in then timeout expires and because of that there is no logout.
            So the problem is in that the unsupported scripts doesn't log out.

            Comment

            • Richard77
              Junior Member
              • Oct 2019
              • 2

              #7
              Originally posted by vso
              I use it a lot to send bulks of items. But at the current time the necessity is to check our software defined storage, find the created new objects and based on that create new objects or delete old objects in Zabbix.
              2. I checked the audit log in Zabbix and see that I have more log on actions of the user that runs the scripts than log off,
              also I see that my external check is often becomes unsupported in Zabbix. After that I found the table Sessions at the DB server and realized that I have up to 1 billion rows in this table.

              Comment

              Working...