fixed the resource capture function.
fixed so that alarm state changed according to the instance state.
create hash when the capture was error.
fix find_alarm method.
fix evaluate memory_usage.
Merge pull request #512 from axsh/feature-metric-alarm

Feature metric alarm
Merge pull request #511 from axsh/feature-metric-libs

Feature metric libs