{"action":"closed","issue":{"url":"https://api.github.com/repos/mclarkson/nagrestconf/issues/28","labels_url":"https://api.github.com/repos/mclarkson/nagrestconf/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/mclarkson/nagrestconf/issues/28/comments","events_url":"https://api.github.com/repos/mclarkson/nagrestconf/issues/28/events","html_url":"https://github.com/mclarkson/nagrestconf/issues/28","id":55685194,"number":28,"title":"Ability to add, Inability to delete host with special character in the name field","user":{"login":"cullenp","id":5694972,"avatar_url":"https://avatars.githubusercontent.com/u/5694972?v=3","gravatar_id":"","url":"https://api.github.com/users/cullenp","html_url":"https://github.com/cullenp","followers_url":"https://api.github.com/users/cullenp/followers","following_url":"https://api.github.com/users/cullenp/following{/other_user}","gists_url":"https://api.github.com/users/cullenp/gists{/gist_id}","starred_url":"https://api.github.com/users/cullenp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cullenp/subscriptions","organizations_url":"https://api.github.com/users/cullenp/orgs","repos_url":"https://api.github.com/users/cullenp/repos","events_url":"https://api.github.com/users/cullenp/events{/privacy}","received_events_url":"https://api.github.com/users/cullenp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-27T22:36:25Z","updated_at":"2015-01-28T01:19:24Z","closed_at":"2015-01-28T01:19:24Z","body":"I used the following command to add a host to nagrestconf. \r\n\r\ncurl -v -knX POST -d \"json={\\\"folder\\\":\\\"local\\\",\r\n\t\\\"name\\\":\\\"RS-ib1.prod_#220\\\",\r\n\t\\\"alias\\\":\\\"IB Production IB1\\\",\r\n\t\\\"ipaddress\\\":\\\"$HOST_IP\\\",\r\n\t\\\"template\\\":\\\"windows-server\\\",\r\n\t\\\"hostgroup\\\":\\\"IB\\\",\r\n\t\\\"servicesets\\\":\\\"windows-server\\\"}\" http://$NAGIOSIP/rest/add/hosts\r\n\r\nOur hosting service adds a number including a # to the name.  This completed with a \"Success\" though the instance is not in the correct hostgroup or service set, nor can I edit it with the web GUI.  Any attempt to edit or delete shows the incomplete name as RS-ib1.prod_ and therefore does not reference the host entry.  I get an error \"NAGCTL ERROR: Item not found\".\r\n\r\nIf I try the delete command:\r\n\r\ncurl -v -knX POST -d \"json={\\\"folder\\\":\\\"local\\\",\r\n\t\\\"name\\\":\\\"RS-ib1.prod_#220\\\",\r\n\t\\\"alias\\\":\\\"IB Production IB1\\\",\r\n\t\\\"ipaddress\\\":\\\"$HOST_IP\\\",\r\n\t\\\"template\\\":\\\"windows-server\\\",\r\n\t\\\"hostgroup\\\":\\\"IB\\\",\r\n\t\\\"servicesets\\\":\\\"windows-server\\\"}\" http://$NAGIOSIP/rest/delete/hosts\r\n\r\nI get the following error\r\n\r\n\"NAGCTL ERROR: Host is referenced by one or more services. Will not delete.\""}}