-
Notifications
You must be signed in to change notification settings - Fork 28
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
Example of using LogProbe() for Remote logging #9
Comments
The key to understanding monitor-dashboard is understanding the
And when you run your application, you should see this log statement in your console. The difference with this log statement is that it's a nodejs event - meaning you can watch for these events. In particular, a probe running in one process can be monitored by another process. The monitor-dashboard allows you to visualize these remote probes in a dashboard. In your case, you place a log component on your dashboard, connect it to your process (in the setting screen), and you should see that log statement in your browser. That was a high level overview. At this stage of monitor and dashboard, there are far too few examples. Something about writing the code always gets in the way of writing about the code that has been written... |
@lorenwest This is how I have it setup. I'm seeing the log output in the console, but I only see logging output from monitor itself. ex.
I've tried everything I can think of to no avail. |
@nevf If you can explain how you have it set up, I will help getting this going for you. These items will help troubleshooting:
The settings screen should show the host name your application is running on. It can also include filters to show just the logs you care to see. You can filter on log type (info, debug, error, etc) as well as log module name, and place within the module. Thank you for your patience during this period of few example docs. If you'd want to blog about your experience, this will help others with the same issue. |
@lorenwest ok.
I have a Logger function I call which does:
I've also tried: Console output:
FYI. mon_log.info() doesn't output anything as The app is running on the same Windows 8 PC as the monitor-dashboard. For Log settings match pattern is the default:
I've also tried:
Server is: Hope that helps. |
You've gotten very far - congratulations! A few things to point out that may make this easier:
This will create a log output like this:
The reason I bring this up is so you can filter your log output by all Clibu logs, just the db logs, or just the updateArticle log statement. With that said, your filter setting can be something like this:
The So far it looks like you're set up well. Do you have a Let me know how things are working. |
I've changed the filter to: Still can't see anything. I don't see |
The server picker on the options screen needs some work. It doesn't include localhost, and it doesn't allow you to enter servers that it doesn't yet know about. At the bottom of the options form there's a 'view source' button. Push it, and edit the JSON to change the name from |
Edited and changed to localhost and made no difference. Could this be a Windows issue? |
It could possibly be a windows issue, but monitor-dashboard is tested under windows, and it's more likely something we're both not seeing. I see in your original log outputs, you're connecting to a Process probe (sending heapUsed, etc). Do you know if that process probe is connected to the monitor-dashboard server, or to your app server?
I'm just wondering if we're getting anything from your app server, or if it's all coming from the monitor-dashboard server. If you don't mind emailing me the source to your page (Menu / Page Settings / View Source), I'd be happy to see if there's anything in there that may be preventing you from seeing logs from your app server. You can send to [email protected] |
Sent. |
@lorenwest Thanks for you help getting logging working. The doc's need updating to help folks in future. I am seeing the following error now:
Unfortunately there is an issue which prevents me from using monitor. I need to override console.log et.all. and send it's output to my remote logger. Monitor sends it's output to console.log so when I override console.log we get into an endless loop: console.log -> monitor.info -> console.log. The ability for Monitor to capture & remotely log console.log itself would resolve this, but this may not be possible given how it works. |
The console log listener monitors log events, sending them to the console. To disable the console log listener, put the following after
That should disable monitor events from going out to the console.log. Then you can re-route your console log to node-monitor. Again, apologies for the lack of documentation. |
Thanks I'll try that when I get a chance. |
I've installed Node Monitor and it looks pretty amazing so far. I want use Remote application log monitoring but can't work out how to use LogProbe() which from what I can work out is required, otherwise Log output goes to console. I've never used Backbone which probably doesn't help.
Can someone give me a example please.
The text was updated successfully, but these errors were encountered: