Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: list index out of range in graylog_elasticsearch.py #6

Open
Frusecer opened this issue Jun 30, 2018 · 1 comment
Open

Comments

@Frusecer
Copy link

Frusecer commented Jun 30, 2018

2018-06-30 14:09:46,373 [INFO] Indices: ['new_deflector', 'graylog_deflector', 'cl_0']
Traceback (most recent call last):
  File "/usr/local/bin/graylog-archiver", line 9, in <module>
    load_entry_point('graylog-archiver==0.1.4', 'console_scripts', 'graylog-archiver')()
  File "/usr/local/lib/python3.5/dist-packages/graylog_archiver/cli.py", line 33, in main
    archiver.archive()
  File "/usr/local/lib/python3.5/dist-packages/graylog_archiver/graylog_archiver.py", line 18, in archive
    indices = self.graylog.indices_to_archive()
  File "/usr/local/lib/python3.5/dist-packages/graylog_archiver/graylog_elasticsearch.py", line 28, in indices_to_archive
    indices_sorted = sort_indices(self.indices())
  File "/usr/local/lib/python3.5/dist-packages/graylog_archiver/graylog_elasticsearch.py", line 15, in sort_indices
    return sorted(indices, key=extract_number, reverse=True)
  File "/usr/local/lib/python3.5/dist-packages/graylog_archiver/graylog_elasticsearch.py", line 10, in extract_number
    return int(re.findall(r'\d+', index)[0])
IndexError: list index out of range
:~$ curl http://localhost:9200/_cat/indices
green  open cl_0              ZRaJEV32SnO7NTpbC75zqA 4 0 26117570 0  7.8gb  7.8gb
yellow open new_deflector     7n_nZABDT5CpAabZLCy-cw 5 1     4843 0  3.9mb  3.9mb
yellow open graylog_deflector doSV3jTWRZ6IjvLel0vWsw 5 1 69565743 0 20.5gb 20.5gb
# uname -a
Linux syslog 4.4.0-128-generic #154-Ubuntu SMP Fri May 25 14:15:18 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/issue
Ubuntu 16.04.4 LTS \n \l
# cat graylog_archiver.json 
{
  "elasticsearch": {
    "hosts": "localhost"
  },
  "max_indices": 3,
  "backup_dir": "/srv/backups/elasticsearch/graylog",
  "delete": false
}
# dpkg -l | grep graylog
ii  graylog-2.4-repository              1-6                                        all          Package to install Graylog 2.4 GPG key and repository
ii  graylog-server                      2.4.5-1                                    all          Graylog server
@tivrobo
Copy link
Contributor

tivrobo commented Oct 16, 2018

see #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants