1. A mobile device comprising: a processor and memory; an enterprise agent installed on the mobile device, said enterprise agent including functionality for enabling enterprise applications installed on the mobile device to securely access resources of an enterprise system of an enterprise, said enterprise agent configured to collect data values of a plurality of state metrics associated with the mobile device; a plurality of rules stored in the memory, at least some of the rules mapping states indicated by one or more of the state metric data values to problems indicative of security risks and/or productivity risks associated with the enterprise; remedial action data stored in the memory, the remedial action data specifying remedial actions for addressing particular problems, each remedial action corresponding to one or more of the problems; wherein the agent is configured to: programmatically detect instances of said problems, at least in-part, by using the rules to analyze the state metric data values; and respond to a detected instance of one of the problems by executing one of the remedial actions on the mobile device, the executed remedial action corresponding to the problem of the detected problem instance.