Runtime monitoring is necessary for continuous quality assurance of Web services. In a monitoring system, sensors with policies are widely used to collect runtime execution data, detect behavior anomalies and generate alerts. Hard-coded sensors and policies are expensive to develop and maintain. They are hard to accommodate the flexible changes of the service-based system to be monitored. The paper proposes a model-driven approach to facilitate automatic sensor generation and policy enforcement. The sensors and policies are decoupled from the software and are defined at the abstraction model level, including structure and behavior models. WSDL and OWL-S are used for modeling the service-base software, and automatic generating sensors based on dependency and coverage strategies. The policy model is constructed following the WS-Policy framework with a 3-tuple policy definition and a correlation matrix identifying the associations between policies and sensors. Policies are enforced by the policy engine that interoperates with service execution engine to communicate runtime behavior information and verification results. These features have been implemented and experimented with data.