fzaninotto / uptime Goto Github PK
View Code? Open in Web Editor NEWA remote monitoring application using Node.js, MongoDB, and Twitter Bootstrap.
Home Page: http://fzaninotto.github.com/uptime/
License: MIT License
A remote monitoring application using Node.js, MongoDB, and Twitter Bootstrap.
Home Page: http://fzaninotto.github.com/uptime/
License: MIT License
I was curious if there is a way to add a double check before sending an alert that a domain is down. This way it will cut back on the amount of false alerts due to temporary problems. I have used pingdom.com in the past and they way it works is if the domain is not responding to a ping then it will check it again in 15 seconds. If the domain is still not responding the second time then it will send me an alert.
a bulk add checks feature would be nice
having a large textarea where i just can paste in urls.
per url a check should be generated with the name of the url without protocol
It's on the todo list and seems to be an easy one ... when do you think it could be implemented?
When opening a tag page (e.g. http://localhost:8082/dashboard/tags/kwrd ) I get this error.
(Uptime v3 commit 7ed11c4, Ubuntu 11.10 amd64, Node v0.8.14, Mongo DB 2.2.1)
Mongoose: tags.findOne({ name: 'kwrd' }) { fields: undefined, safe: true }
TypeError: /var/uptime/app/dashboard/views/tag.ejs:73
71| '<%= req.query.type || 'month' %>',
72| <%= req.query.date || Date.now() %>,
73| <%= tag.firstTested.valueOf() %>,
74| '/api/tags/<%= tag.name %>/'
75| );
76| jQuery(document).ready(function($) {
Cannot call method 'valueOf' of undefined
at eval (eval at (/var/uptime/node_modules/ejs/lib/ejs.js:223:12))
at exports.compile (/var/uptime/node_modules/ejs/lib/ejs.js:225:15)
at Object.exports.render (/var/uptime/node_modules/ejs/lib/ejs.js:263:13)
at View.exports.renderFile as engine
at View.render (/var/uptime/node_modules/express/lib/view.js:75:8)
at Function.app.render (/var/uptime/node_modules/express/lib/application.js:504:10)
at ServerResponse.res.render as partial
at ServerResponse.module.exports.res.render (/var/uptime/node_modules/express-partials/index.js:55:9)
at Promise. (/var/uptime/app/dashboard/app.js:139:9)
at Promise.addBack (/var/uptime/node_modules/mongoose/lib/promise.js:128:8)
The README.md file should mention that the URL specified as config.monitor.apiUrl needs to be locally accessible without a proxy as the lib/monitor.js is calling this url without the proxy monkey-patch parsed upfront.
It costed me some hours of figuring out why my all my checks are marked as down.
Especially in cases where you run the app behind a reverse proxy - people might put in the proxies hostname info the 'apiUrl' but that might not necessarily be available locally without a proxy.
Will raise a pull request for that soon.
it is recommended to have short names for fields in documents wherever possible, specially in those collections that will have lots of documents. This applies for checkevents and pings.
Having shorter names saves considerable space in mongodb.
Adding a check using the url format (https://some.domain.com:2087) causes the system to break. Attempts to restart it produce the following error:
node app.js
Monitor origin started
info - socket.io started
Express server listening on port 8082 in development mode
http.js:1382
throw new Error('Protocol:' + options.protocol + ' not supported.');
^
Error: Protocol:https: not supported.
at Object.request (http.js:1382:11)
at Object.get (http.js:1394:21)
at HttpPoller.poll (/root/uptime/lib/pollers/http.js:40:23)
at HttpPoller.onResponseCallback (/root/uptime/lib/pollers/http.js:59:17)
at ClientRequest. (native)
at ClientRequest.g (events.js:156:14)
at ClientRequest.emit (events.js:67:17)
at HTTPParser.onIncoming (http.js:1294:11)
at HTTPParser.parserOnHeadersComplete as onHeadersComplete
at Socket.ondata (http.js:1176:24)
Sometime /dashboard/checks displays only undefined/down/new.
Reloading page makes it right again.
https://www.evernote.com/shard/s9/sh/4c955b05-803a-491b-916a-e8679ac224c6/cde89abafc8b22da8109cac96cca2e73
Sometimes websites which are monitored redirect from one page to another
e.g.
http://www.demosite.com
redirects to
http://www.demosite.com/foo
As we do not follow the redirects we get a connect ECONNREFUSED back
In my opinion this would be cool to have a checkbox to enable this
Regards
Bastian
in attempting to add my own simple layer of authentication i tried to put node-uptime behind a reverse proxy. this filed. i tried pointing :80/uptime -> :8082/ and got an error about GETting /uptime. after looking at code i realized that the paths are hard coded. being sneaky i used this reverse proxy:
:80/dashboard -> :8082/
so that i could at least navigate to :80/dashboard/events and while that DID work in allowing me to access the app behind a reverse proxy i had not checks!!! it looks like the checks are dependent upon on url that is used to access the app ???? odd decision there. so i opened up :8082 right now and activated my own BASIC authentication layer but it goes against the pattern of every other single web app i run on my server
any thoughts on this? ideas? possible plans to implement? arguments?
Hello! I'm trying to integrate this badass tool with our own internal monitoring via plugins and I'm having a bit of a problem grasping how the plugin model works.
Do I create an index.js in both the root plugins directory as well as an index.js in the directory of the plugin? I've been trying to enable the example console plugin and haven't been able to do it.
I am using interval branch.
Uptime works when using MongoDB with noauth.
When I set auth=true in MongoDB conf and add users I get following error:
Error: Uptime requires MongoDB v2.1 minimum. The current MongoDB server uses only undefined
MongoDB version in server is 2.2.2.
Full debug output and mongod.log can be found here: https://gist.github.com/4202402
Users for uptime and admin databases:
[pvaarala@server ~]$ mongo uptime -u pvaarala -p password
MongoDB shell version: 2.2.2
connecting to: uptime
> show users
{
"_id" : ObjectId("50bdc5637afe20fc69cf350d"),
"user" : "pvaarala",
"readOnly" : false,
"pwd" : "REMOVED FOR PRIVACY"
}
I am not very familiar with MongoDB so this could also be somekind of configuration problem.
After creating a new tag, user gets redirect to http://localhost:8082/dashboard/checks/id?type=hour&date=date instead of /dashboard/checks/id?type=hour&date=date
This creates a broken link when connecting to Uptime via Apache proxypass:
ProxyPass / http://localhost:8082/
Same issue with "/" redirecting to http://localhost:8082/dashboard/events, but that one could be easily corrected with a rewriterule:
RewriteRule ^/$ http://mydomain/dashboard/events [R]
I installed MongoDB, node.js (from latest source) and uptime (from latest source) on a Debian system.
I receive the following output after executing node app.js
:
Monitor origin started info - socket.io started Express server listening on port 8082 in development mode [Error: http://localhost:8082/api/checks/needingPoll resource responded with error code: 404] Mongoose: pings.ensureIndex({ timestamp: -1 }) { safe: true, background: true } Mongoose: pings.ensureIndex({ check: 1 }) { safe: true, background: true } Mongoose: checkevents.ensureIndex({ timestamp: -1, check: 1 }) { safe: true, background: true } Mongoose: checkhourlystats.ensureIndex({ timestamp: -1, check: 1 }) { safe: true, background: true, unique: true } Mongoose: checkdailystats.ensureIndex({ timestamp: -1, check: 1 }) { safe: true, background: true, unique: true } Mongoose: checkmonthlystats.ensureIndex({ timestamp: -1, check: 1 }) { safe: true, background: true, unique: true } Mongoose: checks.find({ '$where': 'function () {\n if (this.isPaused) return false;\n if (!this.firstTested) return true;\n var delay = (this.lastTested.getTime() - this.firstTested.getTime()) % this.interval;\n return (Date.now() - this.lastTested.getTime() + delay) >= (this.interval || 60000);\n}' }) { fields: { qos: 0 }, safe: true, batchSize: 1000 } Mongoose: taghourlystats.ensureIndex({ timestamp: -1, name: 1 }) { safe: true, background: true, unique: true } Mongoose: tagdailystats.ensureIndex({ timestamp: -1, name: 1 }) { safe: true, background: true, unique: true } Mongoose: tagmonthlystats.ensureIndex({ timestamp: -1, name: 1 }) { safe: true, background: true, unique: true } Mongoose: tags.ensureIndex({ name: 1 }) { safe: true, background: true, unique: true } /home/oliver/uptime/node_modules/mongoose/lib/utils.js:437 throw err; ^ Error: Can't set headers after they are sent. at ServerResponse.OutgoingMessage.setHeader (http.js:650:11) at ServerResponse.res.setHeader (/home/oliver/uptime/node_modules/express/node_modules/connect/lib/patch.js:59:22) at ServerResponse.res.set.res.header (/home/oliver/uptime/node_modules/express/lib/response.js:475:10) at ServerResponse.res.json (/home/oliver/uptime/node_modules/express/lib/response.js:194:8) at Promise. (/home/oliver/uptime/app/api/routes/check.js:36:11) at Promise. (/home/oliver/uptime/node_modules/mongoose/lib/promise.js:128:8) at Promise.EventEmitter.emit (events.js:93:17) at Promise.emit (/home/oliver/uptime/node_modules/mongoose/lib/promise.js:66:38) at Promise.complete (/home/oliver/uptime/node_modules/mongoose/lib/promise.js:77:20) at Promise.resolve (/home/oliver/uptime/node_modules/mongoose/lib/promise.js:144:15)
I don't know if i'm doing something wrong but I can't run uptime in background. I lunch it via putty and the command node app.js but when I exit the shell I can no longer access uptime, and the checks stoped.
Hello,
How can I password protect uptime?
After installation, the software is available to everyone.
Can I use an htaccess authentication here or something?
Greats Leibnitz
when I click the report of tag, the app.js process throw error messages:
/node_modules/node-uptime/node_modules/mongoose/lib/utils.js:437
throw err;
^
TypeError: Invalid select() argument. Must be a string or object.
at Query.select (/node_modules/node-uptime/node_modules/mongoose/lib/query.js
:1075:11)
at Function.findOne (/node_modules/node-uptime/node_modules/mongoose/lib/mode
l.js:970:46)
at model.populate [as _populate](/node_modules/node-uptime/node_modules/mong
oose/lib/model.js:139:6)
at next (/node_modules/node-uptime/node_modules/mongoose/lib/model.js:265:14)
at next (/node_modules/node-uptime/node_modules/mongoose/lib/model.js:228:57)
at next (/node_modules/node-uptime/node_modules/mongoose/lib/model.js:228:57)
at next (/node_modules/node-uptime/node_modules/mongoose/lib/model.js:228:57)
at next (/node_modules/node-uptime/node_modules/mongoose/lib/model.js:228:57)
at next (/node_modules/node-uptime/node_modules/mongoose/lib/model.js:228:57)
at next (/node_modules/node-uptime/node_modules/mongoose/lib/model.js:228:57)
How do I debug the email portions of the uptime app?
I get a strange error after a few seconds.
Using Node v0.8.14, uptime v3 branch interval
Mongoose: pings.aggregate({ '$match': { timestamp: { '$lte': new Date("Fri, 16 Nov 2012 20:40:54 GMT"), '$gte': new Date("Thu, 15 Nov 2012 20:40:54 GMT") } } }) { '$project': { check: 1, responsive: { '$cond': [ { '$and': [ '$isResponsive' ] }, 1, '\u001b[33m0\u001b[39m' ] }, time: 1, tags: 1 } } { '$group': { _id: '$check', count: { '$sum': 1 }, responsiveness: { '$avg': '$responsive' }, responseTime: { '$avg': '$time' }, tags: { '$first': '$tags' }, start: { '$first': 1353012054480 }, end: { '$first': 1353098454480 } } }
Mongoose: pings.aggregate({ '$match': { timestamp: { '$lte': new Date("Fri, 16 Nov 2012 20:40:54 GMT"), '$gte': new Date("Thu, 15 Nov 2012 20:40:54 GMT") } } }) { '$project': { check: 1, responsive: { '$cond': [ { '$and': [ '$isResponsive' ] }, 1, '\u001b[33m0\u001b[39m' ] }, time: 1, tags: 1 } } { '$unwind': '$tags' } { '$group': { _id: '$tags', count: { '$sum': 1 }, responsiveness: { '$avg': '$responsive' }, responseTime: { '$avg': '$time' }, start: { '$first': 1353012054480 }, end: { '$first': 1353098454480 } } }
Mongoose: pings.aggregate({ '$match': { timestamp: { '$lte': new Date("Fri, 16 Nov 2012 20:59:59 GMT"), '$gte': new Date("Fri, 16 Nov 2012 20:00:00 GMT") } } }) { '$project': { check: 1, responsive: { '$cond': [ { '$and': [ '$isResponsive' ] }, 1, '\u001b[33m0\u001b[39m' ] }, time: 1, tags: 1 } } { '$group': { _id: '$check', count: { '$sum': 1 }, responsiveness: { '$avg': '$responsive' }, responseTime: { '$avg': '$time' }, tags: { '$first': '$tags' }, start: { '$first': 1353096000000 }, end: { '$first': 1353099599999 } } }
Mongoose: pings.aggregate({ '$match': { timestamp: { '$lte': new Date("Fri, 16 Nov 2012 20:59:59 GMT"), '$gte': new Date("Fri, 16 Nov 2012 20:00:00 GMT") } } }) { '$project': { check: 1, responsive: { '$cond': [ { '$and': [ '$isResponsive' ] }, 1, '\u001b[33m0\u001b[39m' ] }, time: 1, tags: 1 } } { '$unwind': '$tags' } { '$group': { _id: '$tags', count: { '$sum': 1 }, responsiveness: { '$avg': '$responsive' }, responseTime: { '$avg': '$time' }, start: { '$first': 1353096000000 }, end: { '$first': 1353099599999 } } }
/var/uptime/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:437
throw err;
^
TypeError: Cannot read property 'length' of undefined
at Object.async.forEach (/var/uptime/node_modules/async/lib/async.js:81:17)
at QosAggregator.updateHourlyCheckQos (/var/uptime/lib/qosAggregator.js:40:11)
at async.waterfall.wrapIterator (/var/uptime/node_modules/async/lib/async.js:428:21)
at Collection.aggregate (/var/uptime/node_modules/mongoose/node_modules/mongodb/lib/mongodb/collection.js:1568:7)
at Cursor.nextObject (/var/uptime/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursor.js:540:5)
at Cursor.nextObject.commandHandler (/var/uptime/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursor.js:522:14)
at g (events.js:192:14)
at EventEmitter.emit (events.js:126:20)
at Db._callHandler (/var/uptime/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1473:25)
at Server.connect.connectionPool.on.server._serverState (/var/uptime/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:430:30)
creating a check without a name
results in an inaccessible check because the link is not clickable in the checklisting.
should fallback to url
if name
is blank
When you have time, could you please provide an example of running the monitor on one server and the web app on a separate server? Primarily an example of the yaml config files as they would look on each server. Assume that both servers are in the same domain and thus can see each other. Also assume that the mongodb is running on one of the servers, say, the monitor server. I'm seeing weird behavior when I run the monitor on one server and the web app on a different server, and I want to ensure that I've configured everything correctly.
Thanks in advance!
Please use same more liberal plotting library, so the whole project could be used in some commercial applicationcs. This is a big blocker for some people
Did a normal install on Ubuntu 12.04 via git, and via the tarball
git clone git://github.com/fzaninotto/uptime.git cd uptime/ npm install
but had the same result - nextTick error on start
node app.js node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: Cannot find module 'express' at Function._resolveFilename (module.js:332:11) at Function._load (module.js:279:25) at Module.require (module.js:354:17) at require (module.js:370:17) at Object. (/opt/uptime/app.js:6:18) at Module._compile (module.js:441:26) at Object..js (module.js:459:10) at Module.load (module.js:348:32) at Function._load (module.js:308:12) at Array.0 (module.js:479:10)
I try run heroku.
I updated package.json with engines:
"engines": {
"node": "0.6.x",
"npm": "1.0.x"
},
add start:
"scripts": {
"start": "node app.js"
}
Compilation is ok.
Application throw 503 and this error at: heroku logs:
2012-08-13T17:09:29+00:00 heroku[router]: Error H14 (No web processes running) -> GET shrouded-basin-6069.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
Hi,
I got this error when trying to send email notification
var/www/uptime/node_modules/mongoose/lib/utils.js:410
throw err;
^
TypeError: /var/www/uptime/plugins/email/views/up.ejs:3
1| [Up] Check "<%= check.name %>" went back up
2| On <%= moment(checkEvent.timestamp).format('LLLL') %>,
>> 3| and after <%= moment.duration(checkEvent.downtime).humanize() %> of downtime,
4| a test on URL "<%= check.url %>" responded correctly.
5|
6| <% include details %>
Cannot read property 'years' of undefined
at Object.Duration (/var/www/uptime/node_modules/moment/moment.js:229:29)
at Function.moment.duration (/var/www/uptime/node_modules/moment/moment.js:800:15)
at eval (eval at <anonymous> (/var/www/uptime/node_modules/ejs/lib/ejs.js:223:12))
at exports.compile (/var/www/uptime/node_modules/ejs/lib/ejs.js:225:15)
at Object.exports.render (/var/www/uptime/node_modules/ejs/lib/ejs.js:263:13)
at Promise.exports.init (/var/www/uptime/plugins/email/index.js:51:23)
at Promise.addBack (/var/www/uptime/node_modules/mongoose/lib/promise.js:128:8)
at Promise.EventEmitter.emit (events.js:96:17)
at Promise.emit (/var/www/uptime/node_modules/mongoose/lib/promise.js:66:38)
at Promise.complete (/var/www/uptime/node_modules/mongoose/lib/promise.js:77:20)
vagrant@precise64:/var/www/uptime$ node app.js
I haven't tried to debug yet (I'm very bad with node :-/), I'll tried to take a look as soon as I can.
Thanks a lots for this product !
all requests to the api just wait forever and the console shows the following:
[Error: http://localhost:8000/api/check/needingPollCheck resource not available: socket hang up]
tags are not managable for me, i can add them upon the first creation of a 4check, then they land correclty in the database. but regardless if i have tags or not, the tags section /dashboard/tags
is completly emtpy for me (just having the table headers)
editing a check don't show any tags, the whole textarea look a little bit small. see screenshot.
Screenshot
the app says the saving was successful but the textarea after the save stays empty. also the database doesn't have new tags in it.
I've found a small issue on the email "up" alert, due to the "if then else" that add carriage return, so the subject of the email is empty.
I've fixed it in my fork of the project https://github.com/greggythefly/uptime but I am new to GitHut and don't know how to propose my contribution.
Thanks in advance,
Greg
There was a bug in mongoose 2.5.11 and below that causes an error when installing on Windows. The uptime package references 2.5.11 directly instead of >=. Changing the mongoose version to 2.5.12 or later resolves the issue (I used 2.6.5, the latest label at time of writing). I know this is not your problem, per se - I just wanted to note the issue here in case anyone else ran into this.
Lastly, thank you for the time and effort you've spent writing this app. It's wonderful, and is immediately useful for an internal project I am running. Thanks!
When adding a https check node crashed with a not supported error.
shouldn't "save and add" redirect "/dashboard/checks/new" and not to "/dashboard/checks"?
To calculate the downtime of a tag, uptime sums the downtime of all the checks of the tag. That's not only naive, it brings back results that don't mean anything, e.g. a downtime of 4 days during a single day for a tag with 4 checks.
A better calculation of tag stats should not sum ups and downs and downtime, but rather determine periods during which everything is up, and periods during which at least one check is down. The tag uptime would be the worst possible uptime.
We are deploying Uptime to a cloud environment, and anything that gets logged to the console is getting saved to a file, and eventually our environment fills up completely and we have to redeploy to removed the log file. Is there a way to disable logging every single Mongoose call?
The checks don't seem to be respecting the intervals set when the check is created.
It seems to be drifting from 60 seconds to more and less all the time. Sometimes, more than a whole minute passes until a check is executed.
This happens with the monitor in standalone mode and with it run from app.js.
Ideally, the checks would be scheduled to run at fixed whole minute intervals (:10, :11, :12) and they would run every minute.
Here's an example of what running a check with previous versions and the latest revision of the code (simplified) displays on the 1 hour check page:
10:58:28
10:57:19
10:56:08
10:54:58
10:53:48
10:52:38
10:51:28
10:50:18
10:49:08
10:47:58
10:46:48
10:45:38
10:44:28
10:43:18
10:42:08
10:40:58
10:39:48
update: I've started looking into this issue when some pings were overlapping for some reason and the graph was looking strange.
If you edit a check and put an empty name, there is no longer any link visible to edit the check again.
I was able to add https links to the ui, however the server then bombs out:
Error: Protocol:https: not supported.
at Object.exports.request (http.js:1582:11)
at Object.exports.get (http.js:1589:21)
at HttpPoller.poll (C:\Users\jhribar\node_modules\node-uptime\lib\pollers\http.js:40:23)
at HttpPoller.onResponseCallback (C:\Users\jhribar\node_modules\node-uptime\lib\pollers\http.js:59:17)
at ClientRequest.g (events.js:185:14)
at ClientRequest.EventEmitter.emit (events.js:88:17)
at HTTPParser.parserOnIncomingClient as onIncoming
at HTTPParser.parserOnHeadersComplete as onHeadersComplete
at Socket.socketOnData as ondata
at TCP.onread (net.js:404:27)
It would be useful to be able to add, update, and remove checks from uptime using the RESTful API.
Francois,
I am interested in adding the ability for a check to check if the response contains a specified string. I've been able to accomplish this by modifying the check object / schema, and the pollers. However, I'm unsure if I did this the best way.
Basically, I created a new poller, and I have the new poller (called ContentPoller) inherit from the base poller, and the http and https pollers inherit from the content poller.
My question is, if you were to add this functionality to the pollers, would you have done it this way? Would you have added the content polling option to the base poller instead of creating a new poller that the http and https poller inherit? Basically, how you would have done this?
Thanks in advance,
Chris
For maintenance purposes, I needed to stop MongoDB while Uptime was running. Now in my reports, the few minutes while Mongo was out of order appear as sites where down, with a timeout (those sites are on other servers and do not use Mongo, FYI ;) ).
I propose that a "service outage" value may a better value for those moments.
[Error: http://localhost:8082/api/check/needingPoll resource not available: getHostByName ENOTFOUND]
help me :c
In order to allow for non-http pollers (read: https, ftp, udp, ...), the poller class must be refactored using the adapter pattern.
Prerequisite to #3.
When adding a check, one is forced to always add http://
Would be nice to add http:// if not present.
udp://google.com does not seems to be valid udp url
/root/uptime/uptime/lib/pollers/udp.js:42
'address': host[1],
^
TypeError: Cannot read property '1' of null
at UdpPoller.initialize (/root/uptime/uptime/lib/pollers/udp.js:42:20)
at UdpPoller.BasePoller (/root/uptime/uptime/lib/pollers/base.js:19:8)
at new UdpPoller (/root/uptime/uptime/lib/pollers/udp.js:29:20)
at Monitor.pollCheck (/root/uptime/uptime/lib/monitor.js:105:7)
at Monitor.pollChecksNeedingPoll (/root/uptime/uptime/lib/monitor.js:69:12)
at Array.forEach (native)
at Monitor.pollChecksNeedingPoll (/root/uptime/uptime/lib/monitor.js:68:12)
at IncomingMessage.Monitor.findChecksNeedingPoll (/root/uptime/uptime/lib/monitor.js:88:7)
at IncomingMessage.EventEmitter.emit (events.js:115:20)
at IncomingMessage._emitEnd (http.js:366:10)
Am I missing something obvious here?
i would like to install uptime behind nginx and have them communicating over unix socket...
The project takes long time to install on a stock ubuntu 12.04 machine since packaged version of node is quite old (0.6.2) as for MongoDB (r2.0.4) so you have to add others ppa or compile the binaries yourself.
I wrote some chef cookbooks to help with that, which is nice to use with vagrant.
Hope it will help to spread this great project.
https://github.com/t0k4rt/nodejs-cookbook
https://github.com/t0k4rt/mongodb-cookbook
[email protected]:t0k4rt/uptime-cookbook.git
hi, fzaninotto
glad to see version 3 is come out.
I have some question about usage.
Hey,
I installed it node, npm and mongo on a fresh Ubuntu Server on Rackspace and after executing node app.js I am getting the following output and error:
root@monitoring:~/uptime# node app.js
Monitor origin started
info - socket.io started
Express server listening on port 8082 in development mode
[Error: http://localhost:8082/api/checks/needingPoll resource responded with error code: 404]
Mongoose: pings.ensureIndex({ timestamp: -1 }) { safe: true, background: true }
Mongoose: pings.ensureIndex({ check: 1 }) { safe: true, background: true }
Mongoose: checkevents.ensureIndex({ timestamp: -1, check: 1 }) { safe: true, background: true }
Mongoose: checkhourlystats.ensureIndex({ timestamp: -1, check: 1 }) { safe: true, background: true, unique: true }
Mongoose: checkdailystats.ensureIndex({ timestamp: -1, check: 1 }) { safe: true, background: true, unique: true }
Mongoose: checkmonthlystats.ensureIndex({ timestamp: -1, check: 1 }) { safe: true, background: true, unique: true }
Mongoose: checks.find({ '$where': 'function () {\n if (this.isPaused) return false;\n if (!this.firstTested) return true;\n var delay = (this.lastTested.getTime() - this.firstTested.getTime()) % this.interval;\n return (Date.now() - this.lastTested.getTime() + delay) >= (this.interval || 60000);\n}' }) { fields: { qos: 0 }, safe: true, batchSize: 1000 }
Mongoose: taghourlystats.ensureIndex({ timestamp: -1, name: 1 }) { safe: true, background: true, unique: true }
Mongoose: tagdailystats.ensureIndex({ timestamp: -1, name: 1 }) { safe: true, background: true, unique: true }
Mongoose: tagmonthlystats.ensureIndex({ timestamp: -1, name: 1 }) { safe: true, background: true, unique: true }
Mongoose: tags.ensureIndex({ name: 1 }) { safe: true, background: true, unique: true }
/root/uptime/node_modules/mongoose/lib/utils.js:437
throw err;
^
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (http.js:650:11)
at ServerResponse.res.setHeader (/root/uptime/node_modules/express/node_modules/connect/lib/patch.js:59:22)
at ServerResponse.res.set.res.header (/root/uptime/node_modules/express/lib/response.js:475:10)
at ServerResponse.res.json (/root/uptime/node_modules/express/lib/response.js:194:8)
at Promise.<anonymous> (/root/uptime/app/api/routes/check.js:36:11)
at Promise.<anonymous> (/root/uptime/node_modules/mongoose/lib/promise.js:128:8)
at Promise.EventEmitter.emit (events.js:93:17)
at Promise.emit (/root/uptime/node_modules/mongoose/lib/promise.js:66:38)
at Promise.complete (/root/uptime/node_modules/mongoose/lib/promise.js:77:20)
at Promise.resolve (/root/uptime/node_modules/mongoose/lib/promise.js:144:15)```
Any idea what the problem is?
No matter what website I add, after some seconds the server stops with:
http.js:1604
throw new Error('Protocol:' + options.protocol + ' not supported.');
^
Error: Protocol:https: not supported.
Strangely this happens with all websites I add no matter if it uses SSL or not.
Hello,
im testing uptime, can i clear the data and starts from null?
greats
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.