In my previous blog post I have described the new matchers implemented for the iis_app_pool resource type. In this one I will show examples how to use the new ones for the iis_website and service, together with the two resource types: event_log and perf_counter.
IIS Website resource type
In order to test the IIS website site bindings, you should use the have_site_bindings matcher.
You can give a protocol and chain them like this.
You could specify an IP Address and chain them like this.
or specify a host header
Note: All of the methods can be used together.
In order to test the IIS website virtual directories, you should use the have_virtual_dir matcher.
You can give a path to the virtual directory name, like this.
In order to test the IIS website applications, you should use the have_site_application matcher.
Additionaly you can specify the application pool name, used by the application, and/or the physical path to it.
Service resource type.
In order to test the path to the executable, you should use the have_path_name matcher.
Windows eveng log resource type.
In order to test whether an event log exists, you should use exist matcher.
Performance counter resource type.
In order to test whether a performance counter category exists, you should use exist matcher.
You can specify counter name, like this.