{"action":"created","issue":{"url":"https://api.github.com/repos/jacobsalmela/pi-hole/issues/213","labels_url":"https://api.github.com/repos/jacobsalmela/pi-hole/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/jacobsalmela/pi-hole/issues/213/comments","events_url":"https://api.github.com/repos/jacobsalmela/pi-hole/issues/213/events","html_url":"https://github.com/jacobsalmela/pi-hole/pull/213","id":127826048,"number":213,"title":"scripts to long-term stats","user":{"login":"jacobsalmela","id":3843505,"avatar_url":"https://avatars.githubusercontent.com/u/3843505?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobsalmela","html_url":"https://github.com/jacobsalmela","followers_url":"https://api.github.com/users/jacobsalmela/followers","following_url":"https://api.github.com/users/jacobsalmela/following{/other_user}","gists_url":"https://api.github.com/users/jacobsalmela/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobsalmela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobsalmela/subscriptions","organizations_url":"https://api.github.com/users/jacobsalmela/orgs","repos_url":"https://api.github.com/users/jacobsalmela/repos","events_url":"https://api.github.com/users/jacobsalmela/events{/privacy}","received_events_url":"https://api.github.com/users/jacobsalmela/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jacobsalmela/pi-hole/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/jacobsalmela/pi-hole/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2016-01-21T01:40:44Z","updated_at":"2016-01-21T21:32:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jacobsalmela/pi-hole/pulls/213","html_url":"https://github.com/jacobsalmela/pi-hole/pull/213","diff_url":"https://github.com/jacobsalmela/pi-hole/pull/213.diff","patch_url":"https://github.com/jacobsalmela/pi-hole/pull/213.patch"},"body":"These scripts will be necessary for parsing pihole.log before it is\r\nflushed and then saving the information into a DB.  This information\r\ncan then be displayed in the Web GUI.\r\n\r\n`mysql-server` and `php5-mysql` will need to be installed.\r\n\r\nyou can then setup the database with this command:\r\n\r\n```\r\nmysql -u root -p\"raspberry\" < /usr/local/bin/setupPiholeStats.sql\r\n```\r\n\r\nOnce that is done, run `sudo php /usr/local/bin/lrs.php`"},"comment":{"url":"https://api.github.com/repos/jacobsalmela/pi-hole/issues/comments/173713977","html_url":"https://github.com/jacobsalmela/pi-hole/pull/213#issuecomment-173713977","issue_url":"https://api.github.com/repos/jacobsalmela/pi-hole/issues/213","id":173713977,"user":{"login":"DonLexos","id":15067033,"avatar_url":"https://avatars.githubusercontent.com/u/15067033?v=3","gravatar_id":"","url":"https://api.github.com/users/DonLexos","html_url":"https://github.com/DonLexos","followers_url":"https://api.github.com/users/DonLexos/followers","following_url":"https://api.github.com/users/DonLexos/following{/other_user}","gists_url":"https://api.github.com/users/DonLexos/gists{/gist_id}","starred_url":"https://api.github.com/users/DonLexos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonLexos/subscriptions","organizations_url":"https://api.github.com/users/DonLexos/orgs","repos_url":"https://api.github.com/users/DonLexos/repos","events_url":"https://api.github.com/users/DonLexos/events{/privacy}","received_events_url":"https://api.github.com/users/DonLexos/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T21:32:31Z","updated_at":"2016-01-21T21:32:31Z","body":"@jacobsalmela if you rerun the script it does update the top_chart_stats table but the pie_chart_stats are not updated. It seems to use INSERT IGNORE INTO where the others are different. Is there a specific reason for this?\r\n\r\n```sql\r\n[2016-01-21 21:27:57][1536][debug] SQL query successfully executed: INSERT IGNORE INTO pie_chart_stats VALUES ('2016-01-21', 16346, 1338)\r\n\r\n[2016-01-21 21:27:57][1536][debug] SQL query successfully executed: REPLACE INTO top_chart_stats VALUES ('2016-01-21', 'data.flurry.com', 95)\r\n\r\n```"}}