Comments (4)
processMonitor
is a reference to a remote probe, written for the purpose of monitoring the process aspects of a remote server. You could write your own probe, say, temperatureMonitor
, and that probe could contain the temperature of the remote server.
So the answer to your question - the probe running on the remote server defines the data in the JSON object. Change the probe, and you'll change the data in that object. You could change one of the existing probes, extend it, or write a probe for yourself.
Good luck!
from node-monitor.
Please give me an example of a Probe. (For example: http://lorenwest.github.io/node-monitor/doc/classes/Probe.html).
Whenever I use ping_control()/onControl, it has an error: ping_control/onControl is not a function.
Thank for your help.
from node-monitor.
The left hand panel of the Probe.html page has a list of many different examples of probes. The documentation connects directly with the code so you can see how working probes are built.
Here's an example of a few probes on a dashboard: http://lorenwest.github.io/monitor-dashboard/pages/overview/dashboards.html
I can't provide consulting, so I hope these examples provide enough guidance.
from node-monitor.
I have spent two days on what you told me, but it is difficult to understand the Probe.
Whenever I run a server, It appears an error [2017-02-21T06:31:29.106Z] [ERROR] Monitor.control.Process.ping - Probe not connected
Monitor App:
var Monitor = require('monitor');
var LOW_MEMORY_THRESHOLD = 100000000;
// Set the probe to push changes every 10 seconds
var options = {
hostName: '192.168.1.70',
probeClass: 'Process',
initParams: {
pollInterval: 10000
}
}
var processMonitor = new Monitor(options);
// Attach the change listener
processMonitor.on('change', function() {
});
// Now connect the monitor
processMonitor.connect(function(error) {
if (error) {
console.error('Error connecting with the process probe: ', error);
process.exit(1);
}
});
// Remote control
processMonitor.control('ping', function(error, response) {
console.log('Ping response: ', response);
});
Server to be monitored:
var Monitor = require('monitor');
var serverMon = new Monitor.Server(options);
serverMon.on('start', function() {
console.log("Server Started...");
});
var options = {
probeClass: 'Process',
initParams: {
pollInterval: 10000
}
}
var Probe = new Monitor.Probe(options);
Probe.ping_control('ping',function(error, content) {
console.log("ping_control: " + content + ', ' + error);
});
//Probe.start();
//console.log(this.probe.get('probeClass'));
serverMon.start();
How to connect probes?
Please help me out!!
from node-monitor.
Related Issues (20)
- Removing components HOT 2
- "Add component" needs scrollbar by default. HOT 1
- npm start monitor failed HOT 1
- Support for HTTP monitoring? HOT 1
- Test with a remote Server HOT 3
- Troubles running example scripts on Mac HOT 5
- Monitor an application from Browser HOT 2
- node-monitor crashes HOT 2
- error running monitor HOT 4
- Error watching for file (runtime.json) ENOSPC HOT 3
- Need more examples HOT 5
- process.EventEmitter is deprecated in Node.js v6.*.* HOT 4
- What about multiple processes? How are they handled? HOT 3
- Cannot get output when running a nodejs script file HOT 1
- getConnection() return null
- Build error on install HOT 1
- Monitor information do not getting correctly in docker container HOT 1
- Waiting for response HOT 1
- Page onInit doesn't save HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-monitor.