Running Growl as a Windows Service - windows-services

Is there a way to run Growl as a Windows Service? I searched around SO, but have not found a solution, please let me know if there is one out there already.

The excellent link to AlwaysUp, provided by mservidio, clearly states that visual notifications will likely be a problem:
Note: When you run Growl as a Windows Service, it may not be visible on your desktop. This
may render the visual notifications useless but the non-visual notifications (email,
forwarding, etc.) should function normally.
I would guess that the reason for this is that growl will try to send notification to the user who started Growl... which is whatever is configured in your windows service, e.g. SYSTEM. Which means you won't see them, because growl doesn't run for your user session.
I have also been wondering how to direct notifications to specific users / sessions. There doesn't seem to be any documentation on this, so I must assume it's currently not supported.

Have you tried Microsoft's Srvany? Its pretty basic but should get the job done if your needs are the same.
This tutorial showing how to configure Growl with AlwaysUp should give you an idea of what to expect when running Growl as a Windows Service.

Related

Monitoring Flowground

This question goes directly to the Flowground developers: Error notifications can currently only be sent by e-mail. This is very difficult to integrate into a monitoring system.
I know that I can use the API to query whether a flow is currently running or not. But I can not receive any error messages.
In the original API of elastic.io it is also possible to access logs: https://api.elastic.io/docs/v2/#retrieve-all-workspace-logs This does not work with Flowground. Are there plans or other possibilities?
The feature is currently "experimental" on the elastic.io instance. As soon as it will be productive, it will also be available on flowground.net.
Nonetheless I will talk with elastic.io, if it will be possible, to get access to this "experimental" feature a little bit earlier and give you feedback #Stephan Häußler.

Nofity User some message from a windows service

I have created a windows service which gets soem info from database and I want to notify user based on the info retreived from the DB. How can I notify user from a windows service using system tray notification? Can you please show me some sample (using IPC mechanism) to get the return value of a method used in a windows service in a system tray notification?
Thanks in advance.
There are several options such as these:
Sockets: (Not too difficult to write, has firewall problems) You can find samples for it almost everywhere.
External WinForm: (The easiest method, has security problems and might blocked by
some antivirus apps) Just create a winForm with the ability to go into
the windows notification area and then tell the service to run its
exe file.
Named Pipes: (Probably the most difficult, but it's the recommended
solution) Here is a Code Project sample.
Other tricks like: Create a hidden winform project (ShowInTask=false) and put it in StartUp. provide it with a FileSystemWatcher object and make it watch for a certain file which the service creates or deletes it to signal the winform.

How to check if a Firefox addon is installed (on another computer)?

As part of my research on web usage, I have people install a Firefox addon to track their visits (kinda like RescueTime, but different for my research).
So I worry whether the users cheat by uninstalling the addon. Is there any way I can have the addon notify me on install/uninstall of the addon?
I know there's a bunch of workarounds for this (say, just by using another browser client). But what can I do for this very specific case?
PS - I have the same question for a Chrome extenion that does pretty much the same thing. I assume I should start another thread to ask that question.
You can register an observer for the em-action-requested topic: https://developer.mozilla.org/en/Observer_Notifications#Extension_Manager. This way you can get notified whenever the user chooses to uninstall your add-on. There is a number of limitations here:
Disabled add-ons don't get notified (they aren't active). You can get notified whenever the user chooses to disable your add-on however.
Most add-ons aren't uninstalled immediately, usually this requires a browser restart. Until that restart the user can still choose to revert his action.
Add-ons can be uninstalled while the browser isn't running, simply by removing the corresponding directory/file. No notification will be sent then.
It might be more reliable to send a regular "I am alive" signal to your server if you want to verify that the add-on is still installed.
For Firefox 4.0 and greater you can use the new AddonManager interface. Call the addAddonListener() method to pass in your listener. Implement the methods on your listener as documented, including onUninstalling() and/or onUninstalled().

Service Watch-dog design

I am working on a legacy product which has seven Windows services and a user interface. There are some bugs in the services which causes crash in every 10-15 days. I need to write an application to monitor the state of the services. If the services get crashed I need to send an e-mail to the administrator to start the services.
I am not able to use the auto recovery process since during some of the crashes, the Microsoft error report dialog or some other dialogs appears and the service is consider running till the message is acknowledged.
So, I am planning to go for this individual application / watch-service to monitor the crashes until the bugs in the original services are completely fixed.
Please share your views on the design of the watch-dog service.
Thanks.
From you question I understood that windows can't tell if the service ends because it shows a dialouge. If windows can't detect that the service has shutdown how is another application.
you will have to find so evidence that the process is doing what is supposed to do. checking that a log file is growing or seeing if events are being written is the simplest thing off hand.
You're question suggests that windows service recovery does not get triggered because of a an error dialog not being clicked. Perhaps what you need is something to detect that the error dialog is open and click the button. This way, the service can exit successfully and windows service recovery can kick in.
I have attached a program I use to automatically click annoying clearcase dialogs. Below is a sample config file that drives the program. All you need to do is to add a new line of clickInfo and fill in the correct window and button captions.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="clickConfiguration" type="ClickButton.ClickConfigurationSection, ClickButton"/>
</configSections>
<clickConfiguration>
<clickInfo windowName="ClearCase" buttonName="Proceed" />
</clickConfiguration>
</configuration>
Hope it helps!
If you cannot fix those services but can "expose" them as an HTTP resource on Internet, you can use online website monitoring services to periodically check if the service(s) are still on. Create a small website that knows how to "ping" your service(s) locally and request its page(s) on a schedule by one of those monitoring services.
I know several of such services: http://www.setcronjob.com/, http://www.webcron.org/, http://scheduler.codeeffects.com. The last one can even monitor your HTTP resources on your private network but this feature is not free. Hope this helps.
Funny how you need to hand-edit the registry to disable Drwatson and there's a commandline to enable it back ;) here, check this Microsoft KB: http://support.microsoft.com/kb/188296

Ideas for web application with external input and realtime notification

I am to build a web application which will accept different events from external sources and present them quickly to the user for further actions. I want to use Ruby on Rails for the web application. This project is a internal development project. I would prefer simple and easy to use solutions for rapid development over high reliable and complex systems.
What it should do
The user has the web application opened in his browser. Now an phone call comes is. The phone call is registered by a PBX monitoring daemon. In this case via the Asterisk Manager Interface. The daemon sends the available information (remote extension, local extension, call direction, channel status, start time, end time) somehow to the web application. Next the user receives a notified about the phone call event. The user now can work with this. For example by entering a summary or by matching the call to a customer profile.
The duration from the first event on the PBX (e.g. the creation of a new channel) to the popup notification in the browser should be short. Given a fast network I would like to be within two seconds. The single pieces of information about an event are created asynchronously. The local extension may be supplied separate from the remote extension. The user can enter a summary before the call has ended. The end time, new status etc. will show up on the interface as soon as one party has hung up.
The PBX monitor is just one data source. There will be more monitors like email or a request via a web form. The monitoring daemons will not necessarily run on the same host as the database or web server. I do not image the application will serve thousands of logged in users or concurrent requests soon. But from the design 200 users with maybe about the same number of events per minute should not be a scalability issue.
How should I do?
I am interested to know how you would design such an application. What technologies would you suggest? How do the daemons communicate their information? When and by whom is the data about an event stored into the main database? How does the user get notified? Should the browser receive a complete dataset on behalf of a daemon or just a short note that new data is available? Which JS library to use and how to create the necessary code on the server side?
On my research I came across a lot of possibilities: Message brokers, queue services, some rails background task solutions, HTTP Push services, XMPP and so on. Some products I am going to look into: ActiveMQ, Starling and Workling, Juggernaut and Bosh.
Maybe I am aiming too hight? If there is a simpler or easier way, like just using the XML or JSON interface of Rails, I would like to read this even more.
I hope the text is not too long :)
Thanks.
If you want to skip Java and Flash, perhaps it makes sense to use a technology in the Comet family to do the push from the server to the browser?
http://en.wikipedia.org/wiki/Comet_%28programming%29
For the sake of simplicity, for notifications from daemons to the Web browser, I'd leave Rails in the middle, create a RESTful interface to that Rails application, and have all of the daemons report to it. Then in your daemons you can do something as simple as use curl or libcurl to post the notifications. The Rails app would then be responsible for collecting the incoming notifications from the various sources and reporting them to the browser, either via JavaScript using a Comet solution or via some kind of fatter client implemented using Flash or Java.
You could approach this a number of ways but my only comment would be: Push, don't pull. For low latency it's not only quicker it's more efficient, as your server now doesn't have to handle n*clients once a second polling the db/queue. ActiveMQ is OK, but Starling will probably serve you better if you're not looking for insane levels of persistence.
You'll almost certainly end up using Flash on the client side (Juggernaut uses it last time I checked) or Java. This may be an issue for your clients (if they don't have Flash/Java installed) but for most people it's not an issue; still, a fallback mechanism onto a pull notification system might be prudent to implement.
Perhaps http://goldfishserver.com might be of some use to you. It provides a simple API to allow push notifications to your web pages. In short, when your data updates, send it (some payload data) to the Goldfish servers and your client browsers will be notified, with the same data.
Disclaimer: I am a developer working on goldfish.
The problem
There is an event - either external (or perhaps internally within your app).
Users should be notified.
One solution
I am myself facing this problem. I haven't solved it yet, but this is how I intend to do it. It may help you too:
(A) The app must learn about the event (via an exposed end point)
Expose an end point by which you app can be notified about external events.
When the end point is hit (and after authentication then users need to be notified).
(B) Notification
You can notify the user directly by changing the DOM on the current web page they are on.
You can notify users by using the Push API (but you need to make sure your browsers can target that).
All of these notification features should be able to be handled via Action Cable: (i) either by updating the DOM to notify you when a phone call comes in, or (ii) via a push notification that pops up in your browser.
Summary: use Action Cable.
(Also: why use an external service like Pusher, when you have ActionCable at your disposal? Some people say scalability, and infrastructure management. But I do not know enough to comment on these issues. )

Resources