bloonix-check-for-maintenance fehlerhaft

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • bloonix-check-for-maintenance fehlerhaft

      Hallo Leute,

      ich wollte mal wieder ein paar alte Elasticsearch-Daten löschen. Die Retention-Time meiner Hosts ist auf 90 Tage eingestellt, das Skript gibt auch die korrekten Werte zurück, wenn ich es ohne "-r"-Option laufen lasse:

      Source Code

      1. root@monitoring: ~ # bloonix-delete-es-host-data
      2. Jun 12 15:44:46 [NOTICE] --- start processing host 2 type stats,event,results ---
      3. Jun 12 15:44:46 [NOTICE] processing 2 with a data retention of 90 days
      4. Jun 12 15:44:46 [NOTICE] get total size of index bloonix-2016-09 for host 2
      5. Jun 12 15:44:46 [NOTICE] get total size of index bloonix-2016-10 for host 2
      6. Jun 12 15:44:46 [NOTICE] get total size of index bloonix-2016-11 for host 2
      7. Jun 12 15:44:46 [NOTICE] get total size of index bloonix-2016-12 for host 2
      8. Jun 12 15:44:46 [NOTICE] get total size of index bloonix-2017-01 for host 2
      9. Jun 12 15:44:47 [NOTICE] get total size of index bloonix-2017-02 for host 2
      10. Jun 12 15:44:47 [NOTICE] get total size of index bloonix-2017-03 for host 2
      11. Jun 12 15:44:47 [NOTICE] get total size of index bloonix-2017-04 for host 2
      12. Jun 12 15:44:47 [NOTICE] get total size of index bloonix-2017-05 for host 2
      13. Jun 12 15:44:47 [NOTICE] get total size of index bloonix-2017-06 for host 2
      14. Jun 12 15:44:47 [NOTICE] found 4709053 documents for host 2 that are older than Tue Mar 14 14:44:46 2017
      15. Jun 12 15:44:47 [NOTICE] delete data from index bloonix-2016-09 for host 2 older than 2017-03-14
      16. Jun 12 15:44:47 [NOTICE] test run - skip deletion
      17. Jun 12 15:44:47 [NOTICE] delete data from index bloonix-2016-10 for host 2 older than 2017-03-14
      18. Jun 12 15:44:47 [NOTICE] test run - skip deletion
      19. Jun 12 15:44:47 [NOTICE] delete data from index bloonix-2016-11 for host 2 older than 2017-03-14
      20. Jun 12 15:44:47 [NOTICE] test run - skip deletion
      21. Jun 12 15:44:47 [NOTICE] delete data from index bloonix-2016-12 for host 2 older than 2017-03-14
      22. Jun 12 15:44:47 [NOTICE] test run - skip deletion
      23. Jun 12 15:44:47 [NOTICE] delete data from index bloonix-2017-01 for host 2 older than 2017-03-14
      24. Jun 12 15:44:47 [NOTICE] test run - skip deletion
      25. Jun 12 15:44:47 [NOTICE] delete data from index bloonix-2017-02 for host 2 older than 2017-03-14
      26. Jun 12 15:44:47 [NOTICE] test run - skip deletion
      27. Jun 12 15:44:47 [NOTICE] delete data from index bloonix-2017-03 for host 2 older than 2017-03-14
      28. Jun 12 15:44:47 [NOTICE] test run - skip deletion
      29. Jun 12 15:44:47 [NOTICE] delete data from index bloonix-2017-04 for host 2 older than 2017-03-14
      30. Jun 12 15:44:47 [NOTICE] test run - skip deletion
      31. Jun 12 15:44:47 [NOTICE] delete data from index bloonix-2017-05 for host 2 older than 2017-03-14
      32. Jun 12 15:44:47 [NOTICE] test run - skip deletion
      33. Jun 12 15:44:47 [NOTICE] delete data from index bloonix-2017-06 for host 2 older than 2017-03-14
      34. Jun 12 15:44:47 [NOTICE] test run - skip deletion
      Display All

      Source Code

      1. root@monitoring: ~ # bloonix-delete-es-host-data -r
      2. Jun 12 15:46:32 [NOTICE] --- start processing host 2 type stats,event,results ---
      3. Jun 12 15:46:32 [NOTICE] processing 2 with a data retention of 90 days
      4. Jun 12 15:46:32 [NOTICE] get total size of index bloonix-2016-09 for host 2
      5. Jun 12 15:46:32 [NOTICE] get total size of index bloonix-2016-10 for host 2
      6. Jun 12 15:46:32 [NOTICE] get total size of index bloonix-2016-11 for host 2
      7. Jun 12 15:46:32 [NOTICE] get total size of index bloonix-2016-12 for host 2
      8. Jun 12 15:46:32 [NOTICE] get total size of index bloonix-2017-01 for host 2
      9. Jun 12 15:46:32 [NOTICE] get total size of index bloonix-2017-02 for host 2
      10. Jun 12 15:46:32 [NOTICE] get total size of index bloonix-2017-03 for host 2
      11. Jun 12 15:46:33 [NOTICE] get total size of index bloonix-2017-04 for host 2
      12. Jun 12 15:46:33 [NOTICE] get total size of index bloonix-2017-05 for host 2
      13. Jun 12 15:46:33 [NOTICE] get total size of index bloonix-2017-06 for host 2
      14. Jun 12 15:46:33 [NOTICE] found 4709085 documents for host 2 that are older than Tue Mar 14 14:46:32 2017
      15. Jun 12 15:46:33 [NOTICE] delete data from index bloonix-2016-09 for host 2 older than 2017-03-14
      16. Jun 12 15:46:33 [ERROR] $VAR1 = [
      17. 'path',
      18. 'bloonix-2016-09/stats,event,results/_query',
      19. 'data',
      20. {
      21. 'query' => {
      22. 'filtered' => {
      23. 'filter' => {
      24. 'range' => {
      25. 'time' => {
      26. 'lt' => '1489499192000'
      27. }
      28. }
      29. },
      30. 'query' => {
      31. 'term' => {
      32. 'host_id' => '2'
      33. }
      34. }
      35. }
      36. }
      37. }
      38. ];
      39. Jun 12 15:46:33 [ERROR] rest: request failed to 'http://127.0.0.1:9200/bloonix-2016-09/stats,event,results/_query': [404 Not Found], message: [{"found":false,"_index":"bloonix-2016-09","_type":"stats,event,results","_id":"_query","_version":1,"_shards":{"total":2,"successful":1,"failed":0}}] at line 192
      40. rest: request failed to 'http://127.0.0.1:9200/bloonix-2016-09/stats,event,results/_query': [404 Not Found], message: [{"found":false,"_index":"bloonix-2016-09","_type":"stats,event,results","_id":"_query","_version":1,"_shards":{"total":2,"successful":1,"failed":0}}] at /usr/bin/bloonix-delete-es-host-data line 192.
      Display All


      Leider bin ich hier ein wenig überfordert - hat jemand eine Idee?
      I probably won't go down in history, but I will go down on your sister.
      - Hank Moody