{"action":"opened","number":54,"pull_request":{"url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/pulls/54","id":82015990,"html_url":"https://github.com/cavaliercoder/libzbxpgsql/pull/54","diff_url":"https://github.com/cavaliercoder/libzbxpgsql/pull/54.diff","patch_url":"https://github.com/cavaliercoder/libzbxpgsql/pull/54.patch","issue_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/issues/54","number":54,"state":"open","locked":false,"title":"Add pg.query2.* keys to read SQL from config file","user":{"login":"robbrucks","id":14700960,"avatar_url":"https://avatars.githubusercontent.com/u/14700960?v=3","gravatar_id":"","url":"https://api.github.com/users/robbrucks","html_url":"https://github.com/robbrucks","followers_url":"https://api.github.com/users/robbrucks/followers","following_url":"https://api.github.com/users/robbrucks/following{/other_user}","gists_url":"https://api.github.com/users/robbrucks/gists{/gist_id}","starred_url":"https://api.github.com/users/robbrucks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbrucks/subscriptions","organizations_url":"https://api.github.com/users/robbrucks/orgs","repos_url":"https://api.github.com/users/robbrucks/repos","events_url":"https://api.github.com/users/robbrucks/events{/privacy}","received_events_url":"https://api.github.com/users/robbrucks/received_events","type":"User","site_admin":false},"body":"I've created a new function pg_query2 to provide new pg.query2.* keys to read SQL from a key/value config file instead of from the zabbix key itself.  This will eliminate the zabbix limitation of 255 bytes for the key length with regard to SQL.\r\n\r\nThis will allow users to create lengthy SQL calls without creating a long zabbix key loaded with SQL.\r\n\r\n**I've added a sample query.conf file, but I don't know how to modify the rpm/deb packaging to create the required /etc/libzbxpgsql.d directory or deploy query.conf there automatically.**\r\n\r\n**I also don't know how to modify the packaging to add the new dependency on the C libconfig library.**\r\n\r\nI do have a concern about my code since I haven't coded any C in about 15 years, so please scrutinize it carefully for any issues, including memory allocation.\r\n\r\nThanks!\r\n--Rob","created_at":"2016-08-19T17:25:44Z","updated_at":"2016-08-19T17:25:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a41cf54c7b66493b698e5ba8de43eaf4bd6757d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/pulls/54/commits","review_comments_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/pulls/54/comments","review_comment_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/issues/54/comments","statuses_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/statuses/ae960316c97910c40f33b3eb36ecbe09f87dceb6","head":{"label":"robbrucks:master","ref":"master","sha":"ae960316c97910c40f33b3eb36ecbe09f87dceb6","user":{"login":"robbrucks","id":14700960,"avatar_url":"https://avatars.githubusercontent.com/u/14700960?v=3","gravatar_id":"","url":"https://api.github.com/users/robbrucks","html_url":"https://github.com/robbrucks","followers_url":"https://api.github.com/users/robbrucks/followers","following_url":"https://api.github.com/users/robbrucks/following{/other_user}","gists_url":"https://api.github.com/users/robbrucks/gists{/gist_id}","starred_url":"https://api.github.com/users/robbrucks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbrucks/subscriptions","organizations_url":"https://api.github.com/users/robbrucks/orgs","repos_url":"https://api.github.com/users/robbrucks/repos","events_url":"https://api.github.com/users/robbrucks/events{/privacy}","received_events_url":"https://api.github.com/users/robbrucks/received_events","type":"User","site_admin":false},"repo":{"id":65479500,"name":"libzbxpgsql","full_name":"robbrucks/libzbxpgsql","owner":{"login":"robbrucks","id":14700960,"avatar_url":"https://avatars.githubusercontent.com/u/14700960?v=3","gravatar_id":"","url":"https://api.github.com/users/robbrucks","html_url":"https://github.com/robbrucks","followers_url":"https://api.github.com/users/robbrucks/followers","following_url":"https://api.github.com/users/robbrucks/following{/other_user}","gists_url":"https://api.github.com/users/robbrucks/gists{/gist_id}","starred_url":"https://api.github.com/users/robbrucks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbrucks/subscriptions","organizations_url":"https://api.github.com/users/robbrucks/orgs","repos_url":"https://api.github.com/users/robbrucks/repos","events_url":"https://api.github.com/users/robbrucks/events{/privacy}","received_events_url":"https://api.github.com/users/robbrucks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robbrucks/libzbxpgsql","description":"A comprehensive PostgreSQL monitoring module for Zabbix","fork":true,"url":"https://api.github.com/repos/robbrucks/libzbxpgsql","forks_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/forks","keys_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/teams","hooks_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/hooks","issue_events_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/issues/events{/number}","events_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/events","assignees_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/assignees{/user}","branches_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/branches{/branch}","tags_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/tags","blobs_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/git/refs{/sha}","trees_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/statuses/{sha}","languages_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/languages","stargazers_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/stargazers","contributors_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/contributors","subscribers_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/subscribers","subscription_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/subscription","commits_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/commits{/sha}","git_commits_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/git/commits{/sha}","comments_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/comments{/number}","issue_comment_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/issues/comments{/number}","contents_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/contents/{+path}","compare_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/merges","archive_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/downloads","issues_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/issues{/number}","pulls_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/pulls{/number}","milestones_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/milestones{/number}","notifications_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/labels{/name}","releases_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/releases{/id}","deployments_url":"https://api.github.com/repos/robbrucks/libzbxpgsql/deployments","created_at":"2016-08-11T15:15:28Z","updated_at":"2016-08-11T15:15:29Z","pushed_at":"2016-08-19T16:50:24Z","git_url":"git://github.com/robbrucks/libzbxpgsql.git","ssh_url":"git@github.com:robbrucks/libzbxpgsql.git","clone_url":"https://github.com/robbrucks/libzbxpgsql.git","svn_url":"https://github.com/robbrucks/libzbxpgsql","homepage":null,"size":1254,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cavaliercoder:master","ref":"master","sha":"a185cab3d5330cec2b00f7bc5934a48c47893923","user":{"login":"cavaliercoder","id":7133556,"avatar_url":"https://avatars.githubusercontent.com/u/7133556?v=3","gravatar_id":"","url":"https://api.github.com/users/cavaliercoder","html_url":"https://github.com/cavaliercoder","followers_url":"https://api.github.com/users/cavaliercoder/followers","following_url":"https://api.github.com/users/cavaliercoder/following{/other_user}","gists_url":"https://api.github.com/users/cavaliercoder/gists{/gist_id}","starred_url":"https://api.github.com/users/cavaliercoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cavaliercoder/subscriptions","organizations_url":"https://api.github.com/users/cavaliercoder/orgs","repos_url":"https://api.github.com/users/cavaliercoder/repos","events_url":"https://api.github.com/users/cavaliercoder/events{/privacy}","received_events_url":"https://api.github.com/users/cavaliercoder/received_events","type":"User","site_admin":false},"repo":{"id":30450165,"name":"libzbxpgsql","full_name":"cavaliercoder/libzbxpgsql","owner":{"login":"cavaliercoder","id":7133556,"avatar_url":"https://avatars.githubusercontent.com/u/7133556?v=3","gravatar_id":"","url":"https://api.github.com/users/cavaliercoder","html_url":"https://github.com/cavaliercoder","followers_url":"https://api.github.com/users/cavaliercoder/followers","following_url":"https://api.github.com/users/cavaliercoder/following{/other_user}","gists_url":"https://api.github.com/users/cavaliercoder/gists{/gist_id}","starred_url":"https://api.github.com/users/cavaliercoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cavaliercoder/subscriptions","organizations_url":"https://api.github.com/users/cavaliercoder/orgs","repos_url":"https://api.github.com/users/cavaliercoder/repos","events_url":"https://api.github.com/users/cavaliercoder/events{/privacy}","received_events_url":"https://api.github.com/users/cavaliercoder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cavaliercoder/libzbxpgsql","description":"A comprehensive PostgreSQL monitoring module for Zabbix","fork":false,"url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql","forks_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/forks","keys_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/teams","hooks_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/hooks","issue_events_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/issues/events{/number}","events_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/events","assignees_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/assignees{/user}","branches_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/branches{/branch}","tags_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/tags","blobs_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/git/refs{/sha}","trees_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/statuses/{sha}","languages_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/languages","stargazers_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/stargazers","contributors_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/contributors","subscribers_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/subscribers","subscription_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/subscription","commits_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/commits{/sha}","git_commits_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/git/commits{/sha}","comments_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/comments{/number}","issue_comment_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/issues/comments{/number}","contents_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/contents/{+path}","compare_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/merges","archive_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/downloads","issues_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/issues{/number}","pulls_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/pulls{/number}","milestones_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/milestones{/number}","notifications_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/labels{/name}","releases_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/releases{/id}","deployments_url":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/deployments","created_at":"2015-02-07T08:34:51Z","updated_at":"2016-08-14T11:13:05Z","pushed_at":"2016-08-19T17:25:44Z","git_url":"git://github.com/cavaliercoder/libzbxpgsql.git","ssh_url":"git@github.com:cavaliercoder/libzbxpgsql.git","clone_url":"https://github.com/cavaliercoder/libzbxpgsql.git","svn_url":"https://github.com/cavaliercoder/libzbxpgsql","homepage":null,"size":1254,"stargazers_count":45,"watchers_count":45,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":16,"mirror_url":null,"open_issues_count":16,"forks":16,"open_issues":16,"watchers":45,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/pulls/54"},"html":{"href":"https://github.com/cavaliercoder/libzbxpgsql/pull/54"},"issue":{"href":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/issues/54"},"comments":{"href":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/cavaliercoder/libzbxpgsql/statuses/ae960316c97910c40f33b3eb36ecbe09f87dceb6"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":152,"deletions":2,"changed_files":7}}
{"actor":{"display_login":"robbrucks"}}