Use a script to read data from fritzbox

Started by possamai, February 24, 2014, 12:19:48 PM

Previous topic - Next topic

possamai

I've got a fritzbox and I can read some bandwidth data out of it with a script (the crappy thing doesn't have snmp).
However, I can't figure out how to use this data in NetXMS.
In the Actions Configuration I can run a script on the server or on an agent but I can't use this to collect data :(

Is there another way to periodicly get that data into netxms?

Any other/better solution to get data from the fritzbox is helpful too of course but I'm not gonna install Freetz on it.

Victor Kirhenshtein

Hi!

You can use external parameter or external parameters provider in NetXMS agent. For example, adding

ExternalParameter = Test:my_script.sh

to nxagentd.conf will add new parameter called "Test" to your agent, with value being whatever was sent by script "my_script.sh" to stdout.
Search forum for more information - there should be a lot of topics about external parameters.

Best regards,
Victor

possamai

Well yes but the agent will run on the server.. I can't run it on the fritzbox.
So... the data will be added to the wrong object :(

Victor Kirhenshtein

You can use "proxy node" property of the DCI to place DCIs on right object. Create DCIs as usual on fritzbox object, but set proxy node to management server object - actual data collection will occur on management server. Don't forget to add fritzbox object as trusted node to  management server object.

Best regards,
Victor

Dani@M3T

We also have a fritzbox in one site. How does your script works? telnet or UPnP?

possamai

Upnp. Google for upnp2mrtg and you'll probably find it.
I can send it to you if you can't find it but I'm not at my computer atm so you'll have to wait :-)

Dani@M3T


possamai

#7
@Victor
That's what I was trying but when I add the DCI to the fritzbox, choose the server (which also runs the agent) as a proxy and try to get a list of parameters then the list is empty so I figured I wasn't doing it right.......

I made it a trusted node but that didn't change anything.
I should look up what that does anyway..

I do have "EnableProxy = yes" in the nxagentd.conf so that part should work.

Victor Kirhenshtein

Parameter list always show local parameters - even if proxy node is set. I've registered a bug for that and will fix it eventually. Currently you either have to enter parameter name manually, or create DCIs on management server, then move them to fritzbox node and set proxy node.

Best regards,
Victor