Permalink
Browse files

making mysql check work.

  • Loading branch information...
jeffsu committed Sep 11, 2012
1 parent 9c96df0 commit c70ebda60d55fff6bbc205376e7aa0029ff1be14
Showing with 16 additions and 6 deletions.
  1. +2 −1 README.md
  2. +4 −3 lib/strategies/mysql.ms
  3. +8 −0 mock/example.yml
  4. +2 −2 www/views/sensor.jade
View
@@ -50,6 +50,7 @@ services:
```
### Services
+<<<<<<< Updated upstream
Services are a way of grouping several sensor checks together. In the example above, we have a "google" service w
hich we check by making a get request to "http://www.google.com" and also seeing if we have a connection to port 8
@@ -103,4 +104,4 @@ host: host # required
user: user # required
password: pass # required
sql: "SELECT * FROM users LIMIT 1" # defaults to "SHOW TABLES"
-```
+```
View
@@ -1,10 +1,11 @@
module.exports = #(options) {
var sql = options.query || "SHOW TABLES";
var mysql = require('mysql');
- var conn = mysql.createConnection({ host: options.host, user: option.user, password: options.password });
- conn.connect();
+ var conn = mysql.createClient(options);
return #(cb) {
- conn.query(sql, #(err, rows, fields) { cb(err); });
+ conn.query(sql, #(err, rows, fields) {
+ cb(err);
+ });
};
};
View
@@ -1,4 +1,12 @@
services:
+# mysql:
+# mysql:
+# strategy: mysql
+# sql: SHOW TABLES
+# user: root
+# password: root
+# database: mysql
+
google:
www:
strategy: http
View
@@ -22,8 +22,8 @@ block content
th Last Failure
td
= sensor.lastFailure
- if typeof sensor.lastError == 'string'
- = " (" + sensor.lastError + ")";
+ if sensor.lastError
+ = " (" + sensor.lastError.toString() + ")";
tr
th Uptime
td

0 comments on commit c70ebda

Please sign in to comment.