{"action":"created","issue":{"url":"https://api.github.com/repos/tomkerkhove/promitor/issues/192","repository_url":"https://api.github.com/repos/tomkerkhove/promitor","labels_url":"https://api.github.com/repos/tomkerkhove/promitor/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/tomkerkhove/promitor/issues/192/comments","events_url":"https://api.github.com/repos/tomkerkhove/promitor/issues/192/events","html_url":"https://github.com/tomkerkhove/promitor/issues/192","id":370844220,"node_id":"MDU6SXNzdWUzNzA4NDQyMjA=","number":192,"title":"Make metrics filter for generic scraper optional","user":{"login":"jdevalk2","id":37546486,"node_id":"MDQ6VXNlcjM3NTQ2NDg2","avatar_url":"https://avatars2.githubusercontent.com/u/37546486?v=4","gravatar_id":"","url":"https://api.github.com/users/jdevalk2","html_url":"https://github.com/jdevalk2","followers_url":"https://api.github.com/users/jdevalk2/followers","following_url":"https://api.github.com/users/jdevalk2/following{/other_user}","gists_url":"https://api.github.com/users/jdevalk2/gists{/gist_id}","starred_url":"https://api.github.com/users/jdevalk2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdevalk2/subscriptions","organizations_url":"https://api.github.com/users/jdevalk2/orgs","repos_url":"https://api.github.com/users/jdevalk2/repos","events_url":"https://api.github.com/users/jdevalk2/events{/privacy}","received_events_url":"https://api.github.com/users/jdevalk2/received_events","type":"User","site_admin":false},"labels":[{"id":843132608,"node_id":"MDU6TGFiZWw4NDMxMzI2MDg=","url":"https://api.github.com/repos/tomkerkhove/promitor/labels/azure-monitor","name":"azure-monitor","color":"1d76db","default":false},{"id":900773516,"node_id":"MDU6TGFiZWw5MDA3NzM1MTY=","url":"https://api.github.com/repos/tomkerkhove/promitor/labels/configuration","name":"configuration","color":"70adea","default":false},{"id":846132363,"node_id":"MDU6TGFiZWw4NDYxMzIzNjM=","url":"https://api.github.com/repos/tomkerkhove/promitor/labels/feature-request","name":"feature-request","color":"006b75","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/tomkerkhove/promitor/milestones/4","html_url":"https://github.com/tomkerkhove/promitor/milestone/4","labels_url":"https://api.github.com/repos/tomkerkhove/promitor/milestones/4/labels","id":3580742,"node_id":"MDk6TWlsZXN0b25lMzU4MDc0Mg==","number":4,"title":"v0.3.0","description":"","creator":{"login":"tomkerkhove","id":4345663,"node_id":"MDQ6VXNlcjQzNDU2NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/4345663?v=4","gravatar_id":"","url":"https://api.github.com/users/tomkerkhove","html_url":"https://github.com/tomkerkhove","followers_url":"https://api.github.com/users/tomkerkhove/followers","following_url":"https://api.github.com/users/tomkerkhove/following{/other_user}","gists_url":"https://api.github.com/users/tomkerkhove/gists{/gist_id}","starred_url":"https://api.github.com/users/tomkerkhove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomkerkhove/subscriptions","organizations_url":"https://api.github.com/users/tomkerkhove/orgs","repos_url":"https://api.github.com/users/tomkerkhove/repos","events_url":"https://api.github.com/users/tomkerkhove/events{/privacy}","received_events_url":"https://api.github.com/users/tomkerkhove/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":2,"state":"open","created_at":"2018-08-18T15:53:34Z","updated_at":"2018-10-22T10:29:45Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2018-10-16T23:53:13Z","updated_at":"2018-10-23T07:15:43Z","closed_at":"2018-10-17T18:39:28Z","author_association":"NONE","body":"## Expected Behavior\r\nWhen defining a new generic resource to scrape..\r\n\r\nI am expecting to be able to leave the filter empty, or null.\r\nDeep down, where it constructs the query to Azure Monitor the filter will then not be set resulting in a successful query. It actually checks to see if the property is null. The validation just won't allow it.\r\n\r\nFor instance, querying the network bytes on a Postgres database\r\n```\r\nmetrics: \r\n- name: \"postgres_server_network_in\"\r\n  description: \"Postgres network in\"\r\n  resourceType: \"Generic\"\r\n  resourceUri: \"Microsoft.DBforPostgreSQL/servers/mypostgresdbname\"\r\n  filter: \"1 eq 1\"\r\n  azureMetricConfiguration:\r\n    metricName: \"network_bytes_ingress\"\r\n    aggregation: \"None\"\r\n```\r\n\r\n## Actual Behavior\r\nThe validation fails if the filter parameter is not set.\r\n\r\n## Steps to Reproduce the Problem\r\n\r\n  1. Create postgres DB in azure\r\n  2. Configure with snippet above\r\n  3. Exception is thrown when trying to retrieve the metric\r\n\r\n## Specifications\r\n\r\n  - Version: 0.2.1 (latest)\r\n  - Kubernetes AKS on Azure test cluster\r\n\r\nI want to be able to give it this, which I think will fix the problem:\r\n\r\n```\r\nmetrics: \r\n- name: \"postgres_server_network_in\"\r\n  description: \"Postgres network in\"\r\n  resourceType: \"Generic\"\r\n  resourceUri: \"Microsoft.DBforPostgreSQL/servers/mypostgresdbname\"\r\n  azureMetricConfiguration:\r\n    metricName: \"network_bytes_ingress\"\r\n    aggregation: \"None\"\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/tomkerkhove/promitor/issues/comments/432123922","html_url":"https://github.com/tomkerkhove/promitor/issues/192#issuecomment-432123922","issue_url":"https://api.github.com/repos/tomkerkhove/promitor/issues/192","id":432123922,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjEyMzkyMg==","user":{"login":"jungopro","id":22839439,"node_id":"MDQ6VXNlcjIyODM5NDM5","avatar_url":"https://avatars0.githubusercontent.com/u/22839439?v=4","gravatar_id":"","url":"https://api.github.com/users/jungopro","html_url":"https://github.com/jungopro","followers_url":"https://api.github.com/users/jungopro/followers","following_url":"https://api.github.com/users/jungopro/following{/other_user}","gists_url":"https://api.github.com/users/jungopro/gists{/gist_id}","starred_url":"https://api.github.com/users/jungopro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jungopro/subscriptions","organizations_url":"https://api.github.com/users/jungopro/orgs","repos_url":"https://api.github.com/users/jungopro/repos","events_url":"https://api.github.com/users/jungopro/events{/privacy}","received_events_url":"https://api.github.com/users/jungopro/received_events","type":"User","site_admin":false},"created_at":"2018-10-23T07:15:43Z","updated_at":"2018-10-23T07:15:43Z","author_association":"NONE","body":"hi @tomkerkhove I'm using the docker image v0.2.1, did you implement that fix in the docker image?\r\nIf not, where can I find a dockerfile to build it?\r\n\r\nThanks\r\nOmer"}}
{"actor":{"display_login":"jungopro"}}