{"action":"created","issue":{"url":"https://api.github.com/repos/NagiosEnterprises/ncpa/issues/481","repository_url":"https://api.github.com/repos/NagiosEnterprises/ncpa","labels_url":"https://api.github.com/repos/NagiosEnterprises/ncpa/issues/481/labels{/name}","comments_url":"https://api.github.com/repos/NagiosEnterprises/ncpa/issues/481/comments","events_url":"https://api.github.com/repos/NagiosEnterprises/ncpa/issues/481/events","html_url":"https://github.com/NagiosEnterprises/ncpa/issues/481","id":346180600,"node_id":"MDU6SXNzdWUzNDYxODA2MDA=","number":481,"title":" NCPA fails if there are spaces in argument -a -q","user":{"login":"jardysx","id":14908136,"node_id":"MDQ6VXNlcjE0OTA4MTM2","avatar_url":"https://avatars0.githubusercontent.com/u/14908136?v=4","gravatar_id":"","url":"https://api.github.com/users/jardysx","html_url":"https://github.com/jardysx","followers_url":"https://api.github.com/users/jardysx/followers","following_url":"https://api.github.com/users/jardysx/following{/other_user}","gists_url":"https://api.github.com/users/jardysx/gists{/gist_id}","starred_url":"https://api.github.com/users/jardysx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jardysx/subscriptions","organizations_url":"https://api.github.com/users/jardysx/orgs","repos_url":"https://api.github.com/users/jardysx/repos","events_url":"https://api.github.com/users/jardysx/events{/privacy}","received_events_url":"https://api.github.com/users/jardysx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-31T13:10:27Z","updated_at":"2018-08-02T09:57:02Z","closed_at":null,"author_association":"NONE","body":"I tried running a script with ncpa.\r\nNCPA agent version 2.1.5\r\ncheck_ncpa.py version 1.1.3\r\n\r\nWorking:\r\n/check_ncpa.py -t 'mytoken' -H X.X.X.X -P 5693 -M 'plugins/check_winfile.exe' -q 'args=--target C:\\Test\\,args=--compare eq,args=--critical 2'\r\n/check_ncpa.py -t 'mytoken' -H X.X.X.X -P 5693 -M 'plugins/check_winfile.exe' -a '--target C:\\Test\\ --compare eq --critical 2'\r\n\r\nDoesn't working:\r\n/check_ncpa.py -t 'mytoken' -H X.X.X.X -P 5693 -M 'plugins/check_winfile.exe' -q 'args=--target C:\\Program Files (x86)\\Nagios\\test.txt,args=--filter age lt -8 hours,args=--critical 0'\r\n/check_ncpa.py -t 'mytoken' -H X.X.X.X -P 5693 -M 'plugins/check_winfile.exe' -a \"--target 'C:\\Program Files (x86)\\Nagios\\test.txt' --filter 'age lt -8 hours' --critical '0'\"\r\n\r\nI think the problem is with arguments -a and -q when there is a space. \"Program Files (x86)\" \"age lt -8 hours\".\r\n\r\nI read in discussions about a similar problem with the -m argument. https://github.com/NagiosEnterprises/ncpa/issues/14"},"comment":{"url":"https://api.github.com/repos/NagiosEnterprises/ncpa/issues/comments/409873477","html_url":"https://github.com/NagiosEnterprises/ncpa/issues/481#issuecomment-409873477","issue_url":"https://api.github.com/repos/NagiosEnterprises/ncpa/issues/481","id":409873477,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTg3MzQ3Nw==","user":{"login":"jardysx","id":14908136,"node_id":"MDQ6VXNlcjE0OTA4MTM2","avatar_url":"https://avatars0.githubusercontent.com/u/14908136?v=4","gravatar_id":"","url":"https://api.github.com/users/jardysx","html_url":"https://github.com/jardysx","followers_url":"https://api.github.com/users/jardysx/followers","following_url":"https://api.github.com/users/jardysx/following{/other_user}","gists_url":"https://api.github.com/users/jardysx/gists{/gist_id}","starred_url":"https://api.github.com/users/jardysx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jardysx/subscriptions","organizations_url":"https://api.github.com/users/jardysx/orgs","repos_url":"https://api.github.com/users/jardysx/repos","events_url":"https://api.github.com/users/jardysx/events{/privacy}","received_events_url":"https://api.github.com/users/jardysx/received_events","type":"User","site_admin":false},"created_at":"2018-08-02T09:57:02Z","updated_at":"2018-08-02T09:57:02Z","author_association":"NONE","body":"Thanks for the reply. I tried it, but it's same.\r\n \r\n-q 'args=--target C:\\File\\' -v\r\nargs=--target+C%3A%5CFile%5C\r\n{\r\n    \"returncode\": 0,\r\n    \"stdout\": \"FILE OK - 2 files to consider |'selected files'=2;;; 'all files'=2 'deleted files'=0\"\r\n}\r\n\r\nuginnodes:Running process with command line: `C:\\Program Files (x86)\\Nagios\\NCPA\\plugins\\check_winfile.exe --target C:\\File\\`\r\n2018-08-02 09:26:16,085:INFO:handler:X.X.X.X - - [2018-08-02 09:26:16] \"GET /api/plugins/check_winfile.exe/?token=mytoken&check=1&args=--target+C%3A%5CFile%5C HTTP/1.1\" 200 267 0.265000\r\n\r\n\r\n-q 'args=--target C:\\Program File\\' -v \r\nargs=--target+C%3A%5CProgram+File%5C\r\n{\r\n    \"returncode\": 3,\r\n    \"stdout\": \"FILE UNKNOWN - Target does not exist\"\r\n}\r\n\r\nuginnodes:Running process with command line: `C:\\Program Files (x86)\\Nagios\\NCPA\\plugins\\check_winfile.exe --target C:\\Program File\\`\r\n2018-08-02 09:26:45,486:INFO:handler:X.X.X.X - - [2018-08-02 09:26:45] \"GET /api/plugins/check_winfile.exe/?token=mytoken&check=1&args=--target+C%3A%5CProgram+File%5C HTTP/1.1\" 200 218 0.281000\r\n\r\n\r\n -q 'args=--target C:\\\\Program File\\\\' -v\r\nargs=--target+C%3A%5C%5CProgram+File%5C%5C\r\n{\r\n    \"returncode\": 3,\r\n    \"stdout\": \"FILE UNKNOWN - Target does not exist\"\r\n}\r\n\r\nuginnodes:Running process with command line: `C:\\Program Files (x86)\\Nagios\\NCPA\\plugins\\check_winfile.exe --target C:\\\\Program File\\\\`\r\n2018-08-02 09:27:04,565:INFO:handler:X.X.X.X - - [2018-08-02 09:27:04] \"GET /api/plugins/check_winfile.exe/?token=mytoken&check=1&args=--target+C%3A%5C%5CProgram+File%5C%5C HTTP/1.1\" 200 218 0.250000\r\n\r\n\r\nProblem with file names isn't for us so big as a problem with spaces in argument --filter age lt -8 hours. We tried lots of combinations with / \\ \" '.\r\n\r\n\r\n"}}
{"actor":{"display_login":"jardysx"}}