View Full Version : Zabbix .NET client
mbjoerling
07-06-2006, 15:19
Hi
I've been developing a new zabbix client which is based upon the .NET 1.1 framework.
At the moment it features:
* Active mode
* Performance monitoring
* Service state
* Agent.version
* Agent.update (Remote client update, so its easier to update many servers- work in progress...)
* Secure connection over SSH. It will only communicate though localhost and need a SSH certificate at the zabbix server with SSH access.
I would like to hear from a few peoples which would like to beta test the client and send me error reports.
If someone want to develop on the client too, that can be arranged.
Regards
Matias Bjørling
erisan500
07-06-2006, 15:23
Put me on the list mate, i'll be happy to do some testing.
Greetings
mbjoerling
07-06-2006, 15:35
Oki, great :)
Ill hope its not too hard to get the client running.
RohrbaGe
07-06-2006, 18:44
Hi,
please put me also on the list.
I have some servers where I can test this agent.
Will you share the code also?
Gerald
ruckus37
08-06-2006, 11:06
I up for testing, we are running primary Windows 2003 servers, sounds interesting, but why a .net version and not the zabbix win32 agent?
mbjoerling
08-06-2006, 12:35
The win32 client does not fit into the needs that i have, and the amount of work making the win32 client better and the amount of work getting a .net client up and working will be the same. Yet it is faster to code in .net than C/C++ because of the framework and memory management.
The auto update and secure connection could be builded around the win32 zabbix client, but it would be a more clumbersome solution, and require more finegrained work. The secure connection part is at the moment only "plink" from Putty that connects inside the client. In the future, when the socket framework for zabbix have matured ( with persistent connection) , it will be easy to extend it for SSL, which could be a good solution.
I'll finish the autoupdater and clean up the code. Then ill find some place to host source code and put out a package which expain how to use the client.
joeninety2
08-06-2006, 15:35
I would also be most interested in testing out this client, please could you send me the details.
many thanks
Joe
mbjoerling
08-06-2006, 19:14
Great :D
Im happy to see people wanna help out.
Ive changed my post about the win32 client, because it was not my intention to bash the win32 client, but instead about making a client which fits the needs that i have, which is security and easy handling of updates.
The counters is implemented with a strategy pattern, and make it easy for extending with lots of counters.
Ill goto work again tomorrow, then ill continue the development.
donjjones
09-06-2006, 22:09
Go ahead and add me to the list!!
mbjoerling
09-06-2006, 22:28
Great! :)
I've changed my mind about the autoupdate manager and startet developing a Java service, that can handle updates for clients. It would make it easy to control updates to clients. Maybe some clients want the very edge and other want to wait. It is ofcause possible by just changing the link in Zabbix where it should download. But i would like some centralised place for pushing updates to the client and where it is though SSL, to make sure the client only get client from a trusted provider.
Pathfinder
13-06-2006, 18:28
I'm very eager to check it out mr bjoerling ;)
It'll be opensource?
mbjoerling
08-07-2006, 16:36
Hi. Sorry for the long response time.
I've applied for some project space on sourceforge and waiting for confirmation if the project will be hosted by them.
The agent works at the moment with auto update, ssl and so on. I still need to make some refinements to the performance monitor, but ill release it before that, with a guide how to get the agent working. It's a little bit harder because of the SSL which is mandatory for getting it to report. (I havent done so it can be disablet yet, someone wanna kick in? :) )
When it get on sourceforge, fell free to play with it and hacking on the code.
You can add me to the list. Thanks!
mbjoerling
13-07-2006, 16:19
Thanks :)
Im waiting on the management to give ok for opensource the project.
Sourceforge have accepted the project and the project site will be here:
https://sourceforge.net/projects/zanet/
sounds interesting, please add me to the list :)
mbjoerling
20-07-2006, 16:53
A little status
The person that need to give a OK for the project is here next Monday. I'll hope to catch him there for asking if the project can be opensourced.
I've added MSSQL support. So it's possible to retrieve scalar values ( single values, aggregated values and so on. ).
If there's some interest for others database support, it can be easily extended via ODBC drivers. At the moment it uses ADO.NET with no connectionpool.
mbjoerling
25-07-2006, 10:50
Oriiiight!!!
Got an OK from the bosses... Let's rock'n'roll :)
Ill shape it up, removing vendor specific code and kicks it on sourceforge!
mbjoerling
25-07-2006, 17:22
http://sourceforge.net/projects/zanet/
CVS is updated ( For those who wants to use it )
If you wanna use SSH else skip then and go to next step.
You need to add the key of the zabbix server to the Windows registration database.
1. SSH to the server with putty.
2. Go into regedit and goto [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHo stKeys]
3. Find the proper key and insert it into [KEY_USERS\.Default\Software\SimonTatham\PuTTY\SshH ostKeys]
4. Add a user on the zabbix server and make sure it can port forward.
Next step ...
Download installer fra sourceforge and agent.conf file.
Copy agent.conf into "C:\" and set it up. If you use SSH, specify where the SSH key and SSH user.
Install Zabbixagent.net check C:\agent.log for information if it went well. It will report errors there. If it tries to connect many times, it cant connect to the zabbix server. Check server string and port.
The agent only honor active items.
It should start to report in :)
If you wanna check out the sourcecode, you can check sourceforge for information.
mbjoerling
02-08-2006, 19:24
Hi, i've uploaded a new version to sourceforge.
I've added a configuration editor for the agent. So it aint so hard to get working. This will remove the need for agent.conf and it specifices more clearly what needs to be filled out for the agent to work.
Then i've made some preliminary work to add dynamic modules into the agent, so it can be possible to add modules to the agent, without recompiling it.
The new version is 0.9 Build 10, and CVS is updated in a min.
mbjoerling
07-08-2006, 17:25
Hi. New build out :)
Build 11 enables the agent to use httping, to get latency when loading a webpage. (and the times it takes to show the page)
And then there is a little fix for performance counter which reported wrong numbers to the Zabbix, which made it dismiss the data.
The httping item can be used with
web.httping[http://address]
It can be downloaded here:
http://www.sourceforge.net/projects/zanet/
bbrendon
19-08-2006, 03:26
Anyone using this client? I'm seriously getting frusturated with how buggy the official windows client is.
mbjoerling
20-08-2006, 15:08
Yea. A few does.
It's still under development, but it's stable and robust when it runs. And supports SSH and autoupdate ( Need a webservice for it ).
If there is any needs or some feature request. You're welcome to post it in this thread.
random.n!ck
06-09-2006, 23:37
Hi,
Thank you for the ZabbixAgent.Net!
I am trying to configure it with the provided Configuration tool.
Could you please verify the meaning of some of the fields, please?
Customer group = "Group" in Zabbix?
Update Service = ?
Local bound port = ? (for SSH [22] or for the Agent [10050])
I have created an SSH private key, that I can use with Putty to auto login to the Zabbix server box. Using the same .ppk file and SSH user name which works for me with Putty, does not seem to work when pressing Test Connection... it does not seem to retrieve the host key.
In the log file I have these entries:
2006-09-06 16:42:15,929 ERROR net.sourceforge.zabbixagent.connection - Could not connect to local tunnel. Check the secure tunnels and the monitor server is up. A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
2006-09-06 16:42:16,211 DEBUG net.sourceforge.zabbixagent.tunneler - Started secure connection
2006-09-06 16:42:16,226 ERROR net.sourceforge.zabbixagent.tunneler - Restarting secure connection for Agent
Thank you very much!
Cheers,
Nick
To secure zabbix connections from windows clients. and also to pass firewalls, I'm tunneling zabbix using autossh with private keys to my linux - zabbix server , creating a remote forwarding of zabbix ports to the client. This way the client initiated the connection, and autossh make sureto reconnect when the connection drops for any reason.
I only need to point zabbix server to localhost and allocate port for every client.
Hadar
mbjoerling
15-09-2006, 16:38
Hi,
Thank you for the ZabbixAgent.Net!
I am trying to configure it with the provided Configuration tool.
Could you please verify the meaning of some of the fields, please?
Customer group = "Group" in Zabbix?
Update Service = ?
Local bound port = ? (for SSH [22] or for the Agent [10050])
I have created an SSH private key, that I can use with Putty to auto login to the Zabbix server box. Using the same .ppk file and SSH user name which works for me with Putty, does not seem to work when pressing Test Connection... it does not seem to retrieve the host key.
In the log file I have these entries:
2006-09-06 16:42:15,929 ERROR net.sourceforge.zabbixagent.connection - Could not connect to local tunnel. Check the secure tunnels and the monitor server is up. A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
2006-09-06 16:42:16,211 DEBUG net.sourceforge.zabbixagent.tunneler - Started secure connection
2006-09-06 16:42:16,226 ERROR net.sourceforge.zabbixagent.tunneler - Restarting secure connection for Agent
Thank you very much!
Cheers,
Nick
Hi. Sorry for the late reply.
Customer Group and Update service is for update service. So the agent can update it self. Ill release a test sourcecode and wdsl to be used for it when i get the time.
LocalBoundPort is the address, in which SSH bind it's local port. So the agent connect's to "localhost:localboundport" when trying to access the zabbix server. In the new version of the agent (Which aint builded yet and released ), it will be possible to add zabbix server and ssh server each. Instead of the ssh server have to be at the zabbix server.
It should receive the host key. Is it in
HKEY_USERS\.DEFAULT\Software\SimonTatham\PuTTY\Ssh HostKeys ?
It looks there for the host key. Copy it over from
HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHo stKeys
if it's not there. :)
The new version includes alot of work from Erisan, and a few new counters.
DFx_Tech
29-09-2006, 15:20
I'm having a little problem with the client, I've just installed, configured and restarted it and after about a minute the log is 100 megs and growing.
It seems to consist of the following repeated segment:
2006-09-29 13:12:42,823 DEBUG net.sourceforge.zabbixagent.util.classutils - Class Scan Begin
2006-09-29 13:12:42,823 INFO net.sourceforge.zabbixagent.util.classutils - Counter: FileExist found
2006-09-29 13:12:42,823 INFO net.sourceforge.zabbixagent.util.classutils - Counter: FileTime found
2006-09-29 13:12:42,823 INFO net.sourceforge.zabbixagent.util.classutils - Counter: Perfcounter found
2006-09-29 13:12:42,823 INFO net.sourceforge.zabbixagent.util.classutils - Counter: RemoteUpdate found
2006-09-29 13:12:42,823 INFO net.sourceforge.zabbixagent.util.classutils - Counter: ServiceState found
2006-09-29 13:12:42,823 INFO net.sourceforge.zabbixagent.util.classutils - Counter: SQLSelect found
2006-09-29 13:12:42,823 INFO net.sourceforge.zabbixagent.util.classutils - Counter: UnknownCounter found
2006-09-29 13:12:42,823 INFO net.sourceforge.zabbixagent.util.classutils - Counter: VersionCounter found
2006-09-29 13:12:42,823 INFO net.sourceforge.zabbixagent.util.classutils - Counter: Httping found
2006-09-29 13:12:42,823 DEBUG net.sourceforge.zabbixagent.util.classutils - Class Scan Ended
2006-09-29 13:12:42,823 INFO net.sourceforge.zabbixagent.active - Starting agent [ZabbixAgent.NET 0.9 Build: 11]
2006-09-29 13:12:42,823 DEBUG net.sourceforge.zabbixagent.active - An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 size, SocketFlags socketFlags)
at ZabbixAgent.Connection.SendTo(String message)
at ZabbixAgent.Active.get_active_checks()
Thanks for making this client available, I hope it's a simple fix for whatever is causing this.
-Jon
mbjoerling
02-10-2006, 09:20
Hi.
Yes, its a bug ( that it feels up the log to 100mb in no time ), it is fixed in CVS :) But there is still some work to do, before it can be used. ( There's a new client configurator in CVS, but the client have a little bit more work todo.
Are you using SSH?, the client will connect to localhost if used, and then it will just go berzerk if connection is not found, causing the log file to get filled up.
DFx_Tech
03-10-2006, 12:04
Hi, thanks for the reply.
I'm not using SSH, the configuration response from the first part of the log is:
2006-10-03 09:54:00,168 INFO net.sourceforge.zabbixagent.configuration - Configuration:
2006-10-03 09:54:00,168 INFO net.sourceforge.zabbixagent.configuration - Customer Name:
2006-10-03 09:54:00,183 INFO net.sourceforge.zabbixagent.configuration - Hostname: dfxws12.DFX.local
2006-10-03 09:54:00,183 INFO net.sourceforge.zabbixagent.configuration - Use SSH for Zabbix: 0
2006-10-03 09:54:00,183 INFO net.sourceforge.zabbixagent.configuration - Zabbix Host: 192.168.158.70
2006-10-03 09:54:00,183 INFO net.sourceforge.zabbixagent.configuration - Zabbix Local Port
2006-10-03 09:54:00,183 INFO net.sourceforge.zabbixagent.configuration - Zabbix Remote Port 10051
Something interesting has happened today, I stopped and restated both the ZabbixAgent.net service and the TMCare service and now the log only contains two startup messages and no errors (or anything else).
Process explorer doesn't show any listening ports or connections for either service though.
Could this be an issue with the Network settings on this machine?
edit:
Doing some debugging with ethereal, this looks suspiciously like a successful query of the Zabbix server by the client. Although Zabbix claims it has no connectivity to the client.
Local:
ZBX_GET_ACTIVE_CHECKS dfxws12.DFX.local
Zabbix box:
ZBX_EOF
But if I do a "telnet <client IP> 10050" I get connection refused, if I try the same with a Win2003 box running the official client telnet connects and I can query the version.
So it doesn't seem to be listening but appears to be able to talk to the server now.
mbjoerling
03-10-2006, 21:48
Hehe. Yea actually when it's not reporting anything it works.
When you add items to the host, then it will write that it load the items in the log. ( and report if it dosent work )
There is no passive function yet, so a telnet client can't connect to the agent and because of that, only Active items will be send to the agent :)
Ill pm you something i've wrote about it.
DFx_Tech
17-10-2006, 18:03
Thanks for the PM, I've got it up and running now.
Although I'm having problems with some of the counters, I don't know if I'm configuring it wrong or the ability to read all the counters is implemented yet?
I've currently got:
perf_counter[\Memory\Available Bytes]
perf_counter[\Memory\Pages/sec],30
perf_counter[\Memory\Transition Faults/sec],5
perf_counter[\PhysicalDisk(_Total)\% Idle Time]
perf_counter[\Processor(_Total)\% Processor Time]
perf_counter[\Processor(_Total)\Interrupts/sec],5
perf_counter[\System\Processor Queue Length],5
perf_counter[\System\System Up Time]
And only 'Memory\Available Bytes', 'System\System Up Time' and 'System\Processor Queue Length' are reporting anything other than zero (using the windows performance tool on the machine shows the counters do provide data).
The log shows worker threads being started for all the counters and no errors.
The type for all the items is 'ZABBIX agent (active)' and it is receiving data for all the items (graphs scrolling etc..).
Thanks for your patience!
mbjoerling
18-10-2006, 10:57
Hi. Ill give it a check. Ill work on a new version of the agent today, so if it's done today, ill check the errors out. There's alot of work in the new version. So i want to see if the errors are in the new version.
mbjoerling
17-11-2006, 14:53
DfX_tech It should be fixed in the new release. :)
hi,
great work. i hope the update function will be implented soon :)
and here is my first bug-report:
look at the attached image, this happens on windows 2003 sp1 with exchange 2003. the mashine is fresh installed.
ask if you have questions:)
kyi
mbjoerling
22-11-2006, 10:28
Yiir! A bug :D Ill push it to Erisan and ask him to take a look at it :)
mbjoerling
22-11-2006, 11:08
kyi, will you try on a server without Exchange installed, i think maybe the counters is pushing the limits. :) Want to see if it the language or something else. :) Thanks
mbjoerling
22-11-2006, 11:55
kye, btw. I can supply a test implementation of the update service if it is?
A Java webservice, running though Tomcat with AXIS.
k, i try it on an new installed mashine without exchange.
DFx_Tech
23-11-2006, 19:27
Got the new client installed and double checked the perf counter names using the handy new counter list. Same issue as before, received data is zero from some counters.
I was about to install the client on another machine, in case it's the machine, but I've just wrecked my Zabbix server with a dist-upgrade that went wrong :(
So I'll test again from a fresh install of both the server and the client over the weekend.
(The new setup program is great btw :) )
mbjoerling
24-11-2006, 16:28
Thanks :D
What counters do you configure ?, then i can try at my workstation.
Anyone tried installing Build 14 of the .NET Agent yet? I tried on 2 different test workstations (both WXP SP2), and after the install, I got an error stating that the Service does not exist (which I confirmed). Also, the configuration page was blank (no options). This was a fresh install of the .NET Agent on both, there was no previous version.
I tried Build 13 and it installed with no problems...
Thanks!
phredbroughton
12-02-2007, 21:10
I have downloaded the latest file ZabbixAgentNET_0.9_Build14.exe to take a look at this agent. I have tried several times to install and receive no errors during installation, but it apparently fails to create the service entry. The files are located in the program files folders and if I run the configuration agent from there, I do get the configuration screens (This does not show if I use the link created in the start programs menu), but after I apply settings and try to restart, it faile complaining that the service doesn't exist. I have uninstalled and re-installed twice, but no luck.
Any ideas?
Logicwrath
26-02-2007, 04:51
I had the same issue when I was testing this out today. You need to use the installutil.exe from the .NET framework to install the service.
ie:
"..\installutil.exe C:\...\ZabbixAgent.exe"
Logicwrath
04-03-2007, 11:42
I created a public and private key.
If I type "plink -i priv.key -P port username@host" I can connect and I get a bash prompt.
I would like to know what I need to enter into the Private Key dialogue in order to get a connection working. When I check the agent.log I see:
ERROR net.sourceforge.zabbixagent.connection - Could not connect to server. Check the secure tunnel and the zabbix server. Error: No connection could be made because the target machine actively refused it
ERROR net.sourceforge.zabbixagent.tunneler - Restarting secure connection for Agent
I have tried entering a path and I also tried just the file name. The SSH2 RSA key I created will not fit in the 1 line box. I assumed it was a path to the key.
Can someone help me get this working on the .NET agent?
Also, what will my host setup be for the Active Agent? I created a host with no IP address. It just seemed like the right thing to do. If I need to specify an IP address would it be the external IP? Also, if this is true how would I specify multiple hosts from an external IP like that? Diffrent ports?
Logicwrath
04-03-2007, 21:51
Alright, I got the SSH tunnel up using my private key. A look through the source helped me with that one.
Those of you using a nonstandard port for SSH would need to add a -P xxx where xxx is the port number in your SSH Server configuration box.
Now, I need to spend my time trying to figure out how to configure the Zabbix server to accept Active Agent data. (If any configuration is needed) and how to properly configure the port forwarding piece as I feel I am not doing it right.
Currently, I have a host setup in Zabbix with no IP address specified. It is using the standard 10050 port.
I need to figure out how to get the port forwarding piece of plink.exe working as I keep getting messages like this when testing.
sshd[30440]: error: connect_to ::1 port 10050: Connection refused
Hi
Could someone give me some pointers how to configure this on a win2k3 box?
I installed it, but what's next.. These are my first steps in Zabbix...
Anny help would be appreciated.
Thx
surftimer
08-06-2007, 17:39
Hi
first of all , great piece of Software and thx to the developers , I need to get all kind of possible information from a 2003 Server .
I can´t get the Network Traffic working at the moment
thank you for any help
Michael
Zabbix Server 1.4
Agent.NET 0.9 Build: 14
Hi
I've been developing a new zabbix client which is based upon the .NET 1.1 framework.
-...-
I would like to hear from a few peoples which would like to beta test the client and send me error reports.
If someone want to develop on the client too, that can be arranged.
Regards
Matias Bjørling
Put me on this list as well mate, I would love to be part of this testing.
Hi
Could someone give me some pointers how to configure this on a win2k3 box?
I installed it, but what's next.. These are my first steps in Zabbix...
Anny help would be appreciated.
Thx
Here's a link to the howto: http://www.zabbix.com/manual/v1.4/
thecleanpc
21-07-2007, 23:42
I like the idea. I just started looking at Zabbix seriously last week. It seems like a very robust and easy-to-use monitoring system. The fact that it has its own agent really helps it to be very robust.
Has anyone seen some of the commercial managed services systems out there, such as Kaseya, N-Able, or Level Platforms? We are looking for a system like this, but have found that all these systems are quite costly and not robust or extensible (like open source projects are). We are a small business solution provider for small businesses.
It would be great to have an open source complete systems management system with a simple piece of software that could be loaded onto all monitored computers that includes the ability to monitor resources (like Zabbix already does) but also do things like remote access (RDP, VNC...), send scripts, alter security settings, install uninstall and restrict programs on a computer, and many other administration functions.
Zabbix seems to have great potential as a starting point for such a project. And this .Net app has the potential to bring that manageability to the Windows platform. We have some programmers and resources we could contribute if there are others out there who share a similar vision.
I would like to hear from others about this, I've seen many open source monitoring systems, but haven't found any open source projects that come close to being what is offered by the commercial providers (if there are please point me in that direction).
Heya all
Can anyone report on the stabillity of this?
I want to implement it here but if I give the M$ dudes this agent and they have issues I am dead in the water.
Thanx
Mozzi
To kill both birds with this one comment you are both on the right trail to start with, trying to get info about Zabbix, most of the commercial stuff they offer for monitoring systems are not even close to the flexibility that Zabbix offers.
Along with the good stuff there's no more robustness I would prefer other than here.
cjwallace
05-10-2008, 02:09
Guys.
Any update on this?
Also will this .Net version make getting information out of the windows event viewer any better?
Craig
gmicalzoma
19-10-2008, 20:23
Hi, I'm very interested on this .Net client but saw it has not been released since December of 2007 (almost a year). Is this project still alive?
By what I read in the Forums, did the collection of Logs and Events ever got implemented?
Sounds like a awesome and very useful project!