Ad Widget

Collapse

Problem with host deleting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mykolaq
    Member
    • May 2015
    • 69

    #1

    Problem with host deleting

    hello!
    I have a problem vs host that have 70080 resources. It is cause i have made error in template for this host. Now i cant delete this host from anywhere: i have tried web interface, zapi ( zabbix api for python), and, the last is bash.
    My bash script:
    Code:
    [ #!/bin/bash
    curl -v -i -X GET -H 'Content-Type:application/json' -d'{
    "jsonrpc": "2.0",
    "method": "host.delete",
    "params": [
    "10118"
    ],
    "auth": "8b956af903d6ded5d467ddf10d1bb329",
    "id": 1
    }' http://127.0.0.1/zabbix/api_jsonrpc.php
    ~
    and i have error when executing this:
    Code:
    ":"SQL statement execution has failed \"DELETE FROM screens_items WHERE (resourceid IN (
    .
    Please help my anybody
    PS: all log is here https://yadi.sk/d/YBn68TAJhQQdp
    Last edited by mykolaq; 22-06-2015, 17:06.
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    Do you already have investigated the respective RDBMS log file for a potential reason?

    Comment

    • mykolaq
      Member
      • May 2015
      • 69

      #3
      Originally posted by BDiE8VNy
      Do you already have investigated the respective RDBMS log file for a potential reason?
      Sorry, no. I wanna do it today

      Comment

      • mykolaq
        Member
        • May 2015
        • 69

        #4
        Originally posted by mykolaq
        Sorry, no. I wanna do it today
        There is no error in mysql.log, but some strange thing. If i manually do select from tables some resourceid from log of script execution, i can see this error:
        Code:
        MariaDB [zabbix]> select * from screens_items where resourceid IN ('25626');
        Empty set (0.46 sec)

        Comment

        • BDiE8VNy
          Senior Member
          • Apr 2010
          • 680

          #5
          Possibly consider enabling the Debug mode of Zabbix frontend to identify the complete SQL statement causing the issue.
          Once identified, one can manually investigate the issue from an interactive SQL session / client.

          Comment

          • mykolaq
            Member
            • May 2015
            • 69

            #6
            Originally posted by BDiE8VNy
            Possibly consider enabling the Debug mode of Zabbix frontend to identify the complete SQL statement causing the issue.
            Once identified, one can manually investigate the issue from an interactive SQL session / client.
            I i understand you correctly, i need to switch zabbix server to debug mode and looking for log. But what i need to grep for sql query? i'm noob in zabbix and dont know that

            Comment

            • BDiE8VNy
              Senior Member
              • Apr 2010
              • 680

              #7
              No, i was referring to Debug mode offered by Zabbix frontend.
              See User groups and watch out for 'Debug'.

              When enabled an additional hyper-link 'Debug' appears in the top right menu wich allows to toggle between Debug information and normal view.

              Edit:
              Maybe consider to vote for ZBX-8571

              Comment

              • mykolaq
                Member
                • May 2015
                • 69

                #8
                Originally posted by BDiE8VNy
                No, i was referring to Debug mode offered by Zabbix frontend.
                See User groups and watch out for 'Debug'.

                When enabled an additional hyper-link 'Debug' appears in the top right menu wich allows to toggle between Debug information and normal view.

                Edit:
                Maybe consider to vote for ZBX-8571
                So easy =) thank you, i'm doing that now

                Comment

                • mykolaq
                  Member
                  • May 2015
                  • 69

                  #9
                  Originally posted by mykolaq
                  So easy =) thank you, i'm doing that now
                  i cant watch debug mode when deleting this host cause all is not responding And work normally only after restart zabbix, apache, mariadb

                  Comment

                  • mykolaq
                    Member
                    • May 2015
                    • 69

                    #10
                    Originally posted by mykolaq
                    i cant watch debug mode when deleting this host cause all is not responding And work normally only after restart zabbix, apache, mariadb
                    I decided to use older copy of this server.

                    Comment

                    Working...