{"action":"created","issue":{"url":"https://api.github.com/repos/nicolargo/glances/issues/749","labels_url":"https://api.github.com/repos/nicolargo/glances/issues/749/labels{/name}","comments_url":"https://api.github.com/repos/nicolargo/glances/issues/749/comments","events_url":"https://api.github.com/repos/nicolargo/glances/issues/749/events","html_url":"https://github.com/nicolargo/glances/issues/749","id":121565888,"number":749,"title":"glances with influxdb logging crashes after some time","user":{"login":"LucChoubert","id":11485055,"avatar_url":"https://avatars.githubusercontent.com/u/11485055?v=3","gravatar_id":"","url":"https://api.github.com/users/LucChoubert","html_url":"https://github.com/LucChoubert","followers_url":"https://api.github.com/users/LucChoubert/followers","following_url":"https://api.github.com/users/LucChoubert/following{/other_user}","gists_url":"https://api.github.com/users/LucChoubert/gists{/gist_id}","starred_url":"https://api.github.com/users/LucChoubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LucChoubert/subscriptions","organizations_url":"https://api.github.com/users/LucChoubert/orgs","repos_url":"https://api.github.com/users/LucChoubert/repos","events_url":"https://api.github.com/users/LucChoubert/events{/privacy}","received_events_url":"https://api.github.com/users/LucChoubert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-10T20:02:19Z","updated_at":"2015-12-10T21:09:19Z","closed_at":null,"body":"Hello nicolargo,\r\n\r\nFirst, I would like to thank you for this very good software.\r\nI am trying to use connected with influxdb (glances --export-influxdb) and after a while, glances stops with following traceback:\r\n\r\n  File \"/usr/local/bin/glances\", line 9, in <module>\r\n    load_entry_point('Glances==2.5.1', 'console_scripts', 'glances')()\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/__init__.py\", line 125, in main\r\n    standalone.serve_forever()\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/core/glances_standalone.py\", line 108, in serve_forever\r\n    return self.__serve_forever()\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/core/glances_standalone.py\", line 93, in __serve_forever\r\n    self.screen.update(self.stats)\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/outputs/glances_curses.py\", line 914, in update\r\n    self.flush(stats, cs_status=cs_status)\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/outputs/glances_curses.py\", line 892, in flush\r\n    self.display(stats, cs_status=cs_status)\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/outputs/glances_curses.py\", line 462, in display\r\n    args=self.args, max_width=plugin_max_width)\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_plugin.py\", line 551, in get_stats_display\r\n    'msgdict': self.msg_curse(args),\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_network.py\", line 254, in msg_curse\r\n    for i in sorted(self.stats, key=operator.itemgetter(self.get_key())):\r\nTypeError: string indices must be integers, not str\r\n\r\nI use:\r\nglances -V\r\nGlances v2.5.1 with psutil v3.3.0\r\n\r\nInfluxDb version 0.9.5.1\r\n\r\nConfig file:\r\n[influxdb]\r\nhost=192.168.1.10\r\nport=8086\r\nuser=root\r\npassword=root\r\ndb=MonitoringDb\r\ntags=host:ubuntu2\r\n\r\nI get many data in influxdb and crash happens after several hours.\r\nI do not have same issue when used only in curses mode\r\n\r\nThank your for your help in advance!\r\n\r\nBest regards,\r\n\r\nLuc\r\n\r\nPS: One more question: glances -s --export-influxdb does not work. What is the best practice to use glances in background with feed of the data to influxdb ?\r\n"},"comment":{"url":"https://api.github.com/repos/nicolargo/glances/issues/comments/163749903","html_url":"https://github.com/nicolargo/glances/issues/749#issuecomment-163749903","issue_url":"https://api.github.com/repos/nicolargo/glances/issues/749","id":163749903,"user":{"login":"nicolargo","id":776747,"avatar_url":"https://avatars.githubusercontent.com/u/776747?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolargo","html_url":"https://github.com/nicolargo","followers_url":"https://api.github.com/users/nicolargo/followers","following_url":"https://api.github.com/users/nicolargo/following{/other_user}","gists_url":"https://api.github.com/users/nicolargo/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolargo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolargo/subscriptions","organizations_url":"https://api.github.com/users/nicolargo/orgs","repos_url":"https://api.github.com/users/nicolargo/repos","events_url":"https://api.github.com/users/nicolargo/events{/privacy}","received_events_url":"https://api.github.com/users/nicolargo/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T21:09:18Z","updated_at":"2015-12-10T21:09:18Z","body":"Hi @LucChoubert , thanks for the report.\r\n\r\nI will have a look on it.\r\n\r\nFor your PS question, you can use the quiet mode:\r\n\r\n    glances -q --export-influxdb\r\n\r\n"}}