Questions about UPS

Started by ophelie6989, January 19, 2010, 05:37:25 PM

Previous topic - Next topic

ophelie6989

Hi,
i would like to manage UPS that are link to computer where an Agent is installed. I would like to have the infornations when the UPS is connected ( that s mean that power is gone off), and i would like to have also the informations about how many time that the UPS can still works?


How can i do that with the console? I have create a new data collection but it don t work.

Thank you

Victor Kirhenshtein

Hello!

You have to configure UPS subagent. Add to agent's configuration file the following:

in main section:

SubAgent = ups.nsm


at the end of file:

*UPS
Device = 1:"COM1:":APC

Replace COM1 with actual port name. If your have UPS other than APC, change communication protocol to BCMXCP or MICRODOWELL, depending on what your UPS supports. Restart agent.

After that, you'll be able to collect information about UPS. All parameters require device id, which is set to 1 in our example.

Best regards,
Victor

Marco Incalcaterra

Quote from: Victor Kirhenshtein on January 28, 2010, 01:11:08 AM

*UPS
Device = 1:"COM1:":APC

Replace COM1 with actual port name. If your have UPS other than APC, change communication protocol to BCMXCP or MICRODOWELL, depending on what your UPS supports. Restart agent.

Best regards,
Victor


Does NetXMS supports USB UPS? If yes, how should I configure it?

Thanks,
Marco

Victor Kirhenshtein

Yes, but only on Windows. To add USB UPS, use the following syntax:

Device = 1:ANY:USB

if you have only one USB UPS attached, and

Device = 1:<UPS serial number here>:USB

if you have multiple USB devices.

Best regards,
Victor

Marco Incalcaterra

Quote from: Victor Kirhenshtein on February 04, 2010, 01:15:05 PM
Yes, but only on Windows. To add USB UPS, use the following syntax:



Now I'm able to start properly the agent but I'm unable to get values from it. All the UPS.xxx functions expect a parameter, what I have to indicate? I tried to experiment myself putting different values (0, 1, USB, USB1, ...) but I always get the same error message "Cannot get parameter: Requested data collection item is not supported by agent".
I don't understand if this is due to the wrong parameter specified or if my USB UPS doesn't support the command (I tried with all the functions, without success). I tried to search in the documentation but there is no info about this topic.

Thank you very much for your support.
Marco.

Victor Kirhenshtein

You should pass device number you have specified in Device= parameter. For exasmple, if you have

Device = 0:ANY:USB

in your config, then you should use for example UPS.SerialNumber(0).
Could you please post your agent's config? Also, try to tun agent in debug mode (with -D switch) and see if there area additional UPS-related messages.

Best regards,
Victor

Marco Incalcaterra

Ok, I tried and the Query Parameter tells "Cannot get parameter: Communication Failure".

Here the agent configuration:

MasterServers = 192.168.0.48
LogFile = {syslog}
FileStore = C:\Program Files\NetXMS\var
SubAgent = winperf.nsm
SubAgent = ups.nsm

*UPS
Device = 0:ANY:USB


Here the output in debug mode:

C:\Program Files\NetXMS\bin>"C:\Program Files\NetXMS\bin\nxagentd.exe" -D -c "C:\Program Files\NetXMS\etc\nxagentd.conf" -n "NetXMSAgentdW32" -e "NetXMS Win32 Agent" -M "192.168.0.48"
Downloading configuration from 192.168.0.48...
Configuration download failed
[07-Feb-2010 16:11:14] Debug: Log file opened
[07-Feb-2010 16:11:14] Additional configs was loaded from C:\nxagentd.conf.d
[07-Feb-2010 16:11:14] Debug: Subagent API initialized
[07-Feb-2010 16:11:14] Subagent "WINNT.NSM" loaded successfully
[07-Feb-2010 16:11:16] Subagent "winperf.nsm" loaded successfully
[07-Feb-2010 16:11:16] Counter set B is empty, collector thread for that set will not start
[07-Feb-2010 16:11:16] Counter set C is empty, collector thread for that set will not start
[07-Feb-2010 16:11:16] Subagent "ups.nsm" loaded successfully
[07-Feb-2010 16:11:16] UPS: Cannot establish communication with device #0 "USB-ANY"
[07-Feb-2010 16:11:17] Debug: Trying to bind on 0.0.0.0:4700
[07-Feb-2010 16:11:17] Listening on socket 0.0.0.0:4700
[07-Feb-2010 16:11:18] NetXMS Agent started
Agent running. Press ESC to shutdown.
[07-Feb-2010 16:11:20] Debug: Incoming connection from 192.168.0.48
[07-Feb-2010 16:11:20] Debug: Connection from 192.168.0.48 accepted
[07-Feb-2010 16:11:20] Debug: {0} Received control message CMD_GET_NXCP_CAPS
[07-Feb-2010 16:11:20] Debug: {0} Sending message CMD_NXCP_CAPS (size 16)
[07-Feb-2010 16:11:20] Debug: {0} Received message CMD_KEEPALIVE
[07-Feb-2010 16:11:20] Debug: {0} Sending message CMD_REQUEST_COMPLETED (size 32)
[07-Feb-2010 16:11:20] Debug: {0} Received message CMD_ENABLE_AGENT_TRAPS
[07-Feb-2010 16:11:20] Debug: {0} Sending message CMD_REQUEST_COMPLETED (size 32)
[07-Feb-2010 16:11:20] Debug: {0} Received message CMD_GET_PARAMETER
[07-Feb-2010 16:11:20] Debug: {0} Requesting parameter "System.Memory.Physical.Total"
[07-Feb-2010 16:11:20] Debug: {0} Sending message CMD_REQUEST_COMPLETED (size 72)
[07-Feb-2010 16:11:20] Debug: {0} Received message CMD_GET_PARAMETER
[07-Feb-2010 16:11:20] Debug: {0} Requesting parameter "System.IO.DiskQueue"
[07-Feb-2010 16:11:20] Debug: {0} Sending message CMD_REQUEST_COMPLETED (size 64)
Agent shutting down...
[07-Feb-2010 16:11:21] Debug: Trap sender thread terminated
[07-Feb-2010 16:11:22] Debug: {0} CommSession::disconnect()
[07-Feb-2010 16:11:22] Debug: {0} Session with 192.168.0.48 closed
[07-Feb-2010 16:11:23] Debug: Listener thread terminated
[07-Feb-2010 16:11:23] Debug: Session Watchdog thread terminated
[07-Feb-2010 16:11:23] Collector thread for counter set A terminated
[07-Feb-2010 16:11:24] NetXMS Agent stopped


It isn't unable to communicate with the UPS,  where am I wrong?

Marco Incalcaterra

Do you have any suggestion?

Thank you very much.
Marco.

Victor Kirhenshtein

Do you have any other program running which may communicate with UPS - agent form UPS vendor, Windows UPS service, etc.?

Best regards,
Victor

Marco Incalcaterra

Quote from: Victor Kirhenshtein on February 10, 2010, 06:21:52 PM
Do you have any other program running which may communicate with UPS - agent form UPS vendor, Windows UPS service, etc.?

Best regards,
Victor


Sorry for the delay in the answer but I was busy. Yes, there is the vendor service running, I'll try to disable it and I'll let you know any news.

Thank you very much for your support.

Best regards,
Marco

Marco Incalcaterra

Quote from: Jmp_3f8h on February 17, 2010, 08:20:25 PM
Quote from: Victor Kirhenshtein on February 10, 2010, 06:21:52 PM
Do you have any other program running which may communicate with UPS - agent form UPS vendor, Windows UPS service, etc.?

Best regards,
Victor


Sorry for the delay in the answer but I was busy. Yes, there is the vendor service running, I'll try to disable it and I'll let you know any news.

Thank you very much for your support.

Best regards,
Marco
So, I tried to disable the vendor monitor but I was unsuccessfull, I guess there should be something else wrong. I'll try to investigate. Thank you very much for your support.

Best Regards, Marco.