Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

probe file with a "gauge" #23

Open
pierrots opened this issue Jul 10, 2015 · 1 comment
Open

probe file with a "gauge" #23

pierrots opened this issue Jul 10, 2015 · 1 comment

Comments

@pierrots
Copy link

in the "gauge" settings to sync with the probe file
"monitor": {
"probeClass": "File",
"hostName": "alpine320",
"appName": "MonitorDashboard",
"appInstance": "1",
"probeId": "e96de244-d8d9-984f-db65-4ebc36688b5c",
"initParams": {
"path": "fileprobe.txt",
},

in the log viewer i can see that the value of text change
11:54:34.878 [info] Connection.2.emit
2015-07-10T09:54:34.878Z
{
"0": "probe:change:29674ed6-44a1-bdfc-f39e-55d624039212",
"1": {
"text": "75\n",
"error": {}
}
}
12:08:06.909 [info] Connection.2.emit
2015-07-10T10:08:06.909Z
{
"0": "probe:change:55ed4e02-34b7-d017-4869-c8ce4c3e4d7b",
"1": {
"text": "85\n",
"error": {}
}
}

how i configure "Data series" in the "gauge" component to get the value of var "text"
thanks


edit 👍
i try a another approach ,
in the 'onInit' of the component Gauge
i put this lines

var monitorProbe = new Monitor({
hostName: 'alpine320',
appName: 'MonitorDashboard',
probeClass: 'File',
initParams: {
pollInterval: 10000 ,
path: 'fileprobe.txt' ,
tail : false
},
});

monitorProbe.on('change', function() {
var data = monitorProbe.get('text') ;
alert (parseInt(data));
}) ;

monitorProbe.connect(function(error) {
console.log("Connected") ;
}) ;

the variable data display the content of my file fileprobe.text
I don't find how declare my component Gauge for place data into the Gauge data series when the OnChange is triggered.
a little help please will be the welcome (i am not a devellopper confirmed) it is for my home server .

@angchoo
Copy link

angchoo commented Oct 27, 2016

why I got this message?

{"msg":"Error instantiating probe File","error":"File probe has not been enabled on this server."}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants