sergeyksv / tinelic Goto Github PK
View Code? Open in Web Editor NEWLightweight application performance and error monitoring server for getsentry (aka raven) and new relic agents
Lightweight application performance and error monitoring server for getsentry (aka raven) and new relic agents
Hi,
Trying out tinelic with mongo-3.2, I have:
{ MongoError: driver is incompatible with this server version
at Object.toError (/usr/share/peerio-tinelic/node_modules/mongodb/lib/mongodb/utils.js:114:11)
at __executeInsertCommand (/usr/share/peerio-tinelic/node_modules/mongodb/lib/mongodb/db.js:1926:27)
at Db._executeInsertCommand (/usr/share/peerio-tinelic/node_modules/mongodb/lib/mongodb/db.js:2028:5)
at Db.wrapped [as _executeInsertCommand] (/usr/share/peerio-tinelic/node_modules/newrelic/lib/instrumentation/mongodb.js:177:25)
at /usr/share/peerio-tinelic/node_modules/mongodb/lib/mongodb/db.js:1348:12
at /usr/share/peerio-tinelic/node_modules/mongodb/lib/mongodb/db.js:1442:20
at /usr/share/peerio-tinelic/node_modules/mongodb/lib/mongodb/db.js:1196:16
at /usr/share/peerio-tinelic/node_modules/mongodb/lib/mongodb/db.js:1905:9
at Server.Base._callHandler (/usr/share/peerio-tinelic/node_modules/mongodb/lib/mongodb/connection/base.js:453:41)
at /usr/share/peerio-tinelic/node_modules/mongodb/lib/mongodb/connection/server.js:488:18
at MongoReply.parseBody (/usr/share/peerio-tinelic/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at .<anonymous> (/usr/share/peerio-tinelic/node_modules/mongodb/lib/mongodb/connection/server.js:446:20)
at emitOne (events.js:96:13)
at emit (events.js:188:7)
at .<anonymous> (/usr/share/peerio-tinelic/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:207:13)
at emitTwo (events.js:106:13)
at emit (events.js:191:7)
at Socket.<anonymous> (/usr/share/peerio-tinelic/node_modules/mongodb/lib/mongodb/connection/connection.js:440:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:548:20) name: 'MongoError' }
Trying to update mongodb node module to the last version available, I have:
TypeError: Cannot read property 'serverConfig' of undefined
at Object.ensureIndex (/usr/share/peerio-tinelic/node_modules/tinyback/index.js:229:25)
at /usr/share/peerio-tinelic/modules/usersapi.js:41:37
at err (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:543:12)
at _runCatcher (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:360:11)
at _run (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:392:13)
at err (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:542:4)
at fnw (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:629:13)
at _runCatcher (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:360:11)
at _run (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:392:13)
at _run_once (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:404:3)
at task (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:648:6)
at /usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:662:6
at _controlFlow (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:541:3)
at Object.safe.parallel (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:1596:3)
at /usr/share/peerio-tinelic/modules/usersapi.js:40:11
at _fnApply (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:173:22)
at _catcher (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:349:11)
at /usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:462:4
at _wrapArgsSure (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:218:14)
at Db.collection (/usr/share/peerio-tinelic/node_modules/mongodb/lib/db.js:454:20)
at Db.wrapped [as collection] (/usr/share/peerio-tinelic/node_modules/newrelic/lib/instrumentation/mongodb.js:177:25)
at users (/usr/share/peerio-tinelic/modules/usersapi.js:39:8)
at err (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:543:12)
at _runCatcher (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:360:11)
at _run (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:392:13)
at err (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:542:4)
at fnw (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:629:13)
at _runCatcher (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:360:11)
at _run (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:392:13)
at _run_once (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:404:3)
at task (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:648:6)
at /usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:662:6
at _controlFlow (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:541:3)
at Object.safe.series (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:1592:3)
at /usr/share/peerio-tinelic/modules/usersapi.js:37:8
at _fnApply (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:173:22)
at _catcher (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:349:11)
at /usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:462:4
at _wrapArgsSure (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:218:14)
at /usr/share/peerio-tinelic/node_modules/tinyback/index.js:217:12
at _fnApply (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:173:22)
at _catcher (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:349:11)
at /usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:462:4
at _wrapArgsSure (/usr/share/peerio-tinelic/node_modules/safe/lib/safe.js:218:14)
at /usr/share/peerio-tinelic/node_modules/mongodb/lib/db.js:236:5
at Server.connectHandler (/usr/share/peerio-tinelic/node_modules/mongodb/lib/server.js:330:7)
at Server.g (events.js:291:16)
at emitOne (events.js:96:13)
at Server.emit (events.js:188:7)
at /usr/share/peerio-tinelic/node_modules/mongodb-core/lib/topologies/server.js:280:14
at /usr/share/peerio-tinelic/node_modules/mongodb-core/lib/connection/pool.js:455:18
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
The readme for this repository tells about mongodb "3.0 and above".
Looks like 3.2 support is broken. Test setup involving 3 config+2 shard servers, using mongodb-org packages, 3.2.11-amd64.
Regards.
macOS 10.13.2
When running Node 8.x, stuck at:
loaded prefixify in 0.002 s
loaded tson in 0.001 s
loaded validate in 0 s
loaded mongo in 0.001 s
loaded obac in 0 s
loaded restapi in 0.001 s
When running Node 5.x with mongodb 2.x/3.x:
loaded prefixify in 0.002 s
loaded tson in 0.001 s
loaded validate in 0 s
loaded mongo in 0.001 s
[TypeError: dbc.open is not a function]
Did I get this project wrong or can I point, for example, a sentry agent to tinelic? What would be the sentry DSN?
404
There are not updates since several years.
Please tell us the state of the project. Do you suggest to use a different project?
Two problems with receiving data from the Ruby newrelic_rpm gem.
First problem is that the Ruby gem sends the data specifying version, license and method to call in the URI path instead of as parameters:
/agent_listener/#{PROTOCOL_VERSION}/#{@license_key}/#{method}
If I modify the Ruby gem to instead send this as parameters to the URI "/agent_listener/invoke_raw_method", then tinelic accepts the requests. The problem then being that it can't seem to parse the data.
tinelic@ip-172-31-18-37:~/tinelic$ node app
loaded prefixify in 0.003 s
loaded tson in 0.001 s
loaded validate in 0 s
loaded mongo in 0.002 s
loaded obac in 0 s
loaded restapi in 0.001 s
loaded cache in 0.196 s
loaded stats in 0.196 s
loaded users in 0.205 s
loaded assets in 0.201 s
loaded collect in 0.009 s
[TypeError: Exactly two arguments are required]
Any idea ?
there is a security issue regarding the /modules/tinybone/base.js function getQueryStringAsObject().
Vulnerability category: client-side prototype pollution.
Potential consequences: attacks such as Cross-Site Scripting, Denial-of-Service, Remote Code Execution or Session Hijacking.
POC:
<script>
getQueryStringAsObject = function(q) {
var b, cv, e, k, ma, sk, v, r = {},
d = function(v) {
return decodeURIComponent(v).replace(/\+/g, " ");
}, //# d(ecode) the v(alue)
s = /([^&;=]+)=?([^&;]*)/g //# original regex that does not allow for ; as a delimiter: /([^&=]+)=?([^&]*)/g
;
//# ma(make array) out of the v(alue)
ma = function(v) {
//# If the passed v(alue) hasn't been setup as an object
if (typeof v != "object") {
//# Grab the cv(current value) then setup the v(alue) as an object
cv = v;
v = {};
v.length = 0;
//# If there was a cv(current value), .push it into the new v(alue)'s array
//# NOTE: This may or may not be 100% logical to do... but it's better than loosing the original value
if (cv) {
Array.prototype.push.call(v, cv);
}
}
return v;
};
//# While we still have key-value e(ntries) from the q(uerystring) via the s(earch regex)...
while (e = s.exec(q)) { //# while((e = s.exec(q)) !== null) {
//# Collect the open b(racket) location (if any) then set the d(ecoded) v(alue) from the above split key-value e(ntry)
b = e[1].indexOf("[");
v = d(e[2]);
//# As long as this is NOT a hash[]-style key-value e(ntry)
if (b < 0) { //# b == "-1"
//# d(ecode) the simple k(ey)
k = d(e[1]);
//# If the k(ey) already exists
if (r[k]) {
//# ma(make array) out of the k(ey) then .push the v(alue) into the k(ey)'s array in the r(eturn value)
r[k] = ma(r[k]);
Array.prototype.push.call(r[k], v);
}
//# Else this is a new k(ey), so just add the k(ey)/v(alue) into the r(eturn value)
else {
r[k] = v;
}
}
//# Else we've got ourselves a hash[]-style key-value e(ntry)
else {
//# Collect the d(ecoded) k(ey) and the d(ecoded) sk(sub-key) based on the b(racket) locations
k = d(e[1].slice(0, b));
sk = d(e[1].slice(b + 1, e[1].indexOf("]", b)));
//# ma(make array) out of the k(ey)
r[k] = ma(r[k]);
//# If we have a sk(sub-key), plug the v(alue) into it
if (sk) {
r[k][sk] = v;
}
//# Else .push the v(alue) into the k(ey)'s array
else {
Array.prototype.push.call(r[k], v);
}
}
}
//# Return the r(eturn value)
return r;
};
getQueryStringAsObject(window.location.search.substring(1))
</script>
?__proto__[test]=test
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.