robertmircea/nagios-nsca-client — Issue #1: Codechange needet to allow submitting of HostChecks
Author: ChrisGeorg
Created: 2012-01-05 11:41:44+00:00
State: open

Hi Robert,

I hve just started using your libary to write my own Monitoring Client as none of the publicly acailable ones is doing what I need. I am really glad with the code you provided and it allready helped me a lot.

One thing I noticed though is that the current code does not allow to send host checks. My understanding is, that if I want to submit a passive host check the service Name needs to be empty. This is prevented by a check you perform in your code.

To get arround this I have replaced your code where you check for null or empty strings with this new one, which only checks for null. This works well for me:
old: if (string.IsNullOrEmpty(serviceName)) throw new ArgumentNullException("serviceName");
new: if (serviceName == null) throw new ArgumentNullException("serviceName");

Do I miss something or is this a vaild change in your opinion? In case it is valid and you are making any changes or consider a new version it would good if you could include this change.

Thanks

Chris