[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

4.6

Need to read SNMP requests from my VBSCRIPT HTA, and output to a strhtml string

Asked by JMSSupport in Visual Basic Programming, VB Script

Tags: APC UPS, All UPS, VBSCRIPT, SNMP

Need to read SNMP requests from my VBSCRIPT HTA, and output to a strhtml string , so i can add the outcome to my html report.

I enclosed the SNMP script i found (thanks to http://www.nagioscommunity.org/wiki/index.php/Howtos:snmp-apc-smart-ups)

If you ever want to find a real challenge please help!
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
These are some OID's that i used: 
 
OID  Value  
.1.3.6.1.4.1.318.1.1.1.2.1.1.0  Main Battery Status  
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.4.1  Environment Temperature in degree celsius  
.1.3.6.1.4.1.318.1.1.1.2.2.1.0  Battery Capacity %  
.1.3.6.1.4.1.318.1.1.1.2.2.2.0  Internal Temperature in degree celsius  
.1.3.6.1.4.1.318.1.1.1.4.2.3.0  Output Load %  
.1.3.6.1.4.1.318.1.1.1.4.2.4.0  Output Current in Ampere 3~'  
.1.3.6.1.4.1.318.1.1.1.4.2.1.0  Output Voltage in Volt 3~'  
.1.3.6.1.4.1.318.1.1.1.4.2.2.0  Output Frequency in Herz'  
[edit]Check Commands
With adding the next lines to the commands file and adding the check commands to the host you can get nice results. 
 
 
  define command{
     command_name    snmp_ups_stat
     command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.1.1.0 -w 3 -c 4 -l 'Main Battery Status'
  }
  
  define command{
     command_name    snmp_ups_envtemp
     command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.10.2.3.2.1.4.1 -w 29 -c 40 -l 'environment Temperature' -u 'degree celsius'
  }
  
  define command{
     command_name    snmp_ups_capa
     command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.2.1.0 -l 'Adv. Battery Capacity' -u '%'
  }
  
  define command{
     command_name    snmp_ups_temp
     command_line    check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.2.2.0 -w 29 -c 40 -l 'internal Temperature' -u 'degree celsius'
  }
  
  define command{
     command_name    snmp_ups_load
     command_line    check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.4.2.3.0 -w 60 -c 90 -l 'Output Load' -u '%'
  }
  
  define command{
     command_name    snmp_ups_current
     command_line    check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.4.2.4.0 -w 30 -c 50 -l 'Output Current' -u 'Ampere 3~'
  }
  
  define command{
     command_name    snmp_ups_volt
     command_line    check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.4.2.1.0 -l 'Output Voltage' -u 'Volt 3~'
  }
  
  define command{
     command_name    snmp_ups_freq
     command_line    check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.4.2.2.0 -l 'Output Frequency' -u 'Herz'
  }
 
[edit]Host ans services configuration
After adding the check commands we can start to use them with a host. Over here is an example for a host with services. 
 
 #### HOST ####
 define host{
   use                     generic-host
   host_name               apc-smart-ups
   alias                   apc-smart-ups
   address                 172.16.10.90
 }
 
 #### SERVICES ####
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Environment-Temperature
   check_command                   snmp_ups_envtemp!public
 }
 
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Battery-Status
   check_command                   snmp_ups_stat!public
 }
 
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Battery-Status
   check_command                   snmp_ups_capa!public
 }
 
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Battery-Status
   check_command                   snmp_ups_freq!public
 }
 
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Battery-Status
   check_command                   snmp_ups_volt!public
 }
 
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Battery-Status
   check_command                   snmp_ups_current!public
   }
 
 define service{
   use                             generic-service
   host_name                       apc-smart-ups
   service_description             Battery-Status
   check_command                   snmp_ups_load!public
}
[+][-]09/09/08 08:40 PM, ID: 22434823Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/10/08 12:42 AM, ID: 22436011Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/10/08 12:51 AM, ID: 22436063Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/10/08 01:58 AM, ID: 22436430Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/10/08 01:58 AM, ID: 22436436Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/10/08 03:15 AM, ID: 22436806Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/10/08 03:33 AM, ID: 22436871Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/10/08 03:35 AM, ID: 22436876Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/10/08 08:36 PM, ID: 22445972Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/17/08 01:39 AM, ID: 22496580Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/17/08 03:54 PM, ID: 22504515Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/18/08 12:35 AM, ID: 22508546Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/21/08 06:44 PM, ID: 22536847Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/22/08 12:37 AM, ID: 22538027Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/22/08 07:10 AM, ID: 22540133Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/07/08 04:35 PM, ID: 22664876Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/11/08 07:07 AM, ID: 22931133Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/11/08 07:13 AM, ID: 22931197Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/11/08 07:19 AM, ID: 22931256Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/11/08 07:46 AM, ID: 22931548Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/12/08 02:38 AM, ID: 22938231Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/12/08 07:40 AM, ID: 22940607Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/13/08 12:11 AM, ID: 22947858Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/12/09 05:42 AM, ID: 24363884Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Visual Basic Programming, VB Script
Tags: APC UPS, All UPS, VBSCRIPT, SNMP
Sign Up Now!
Solution Provided By: JMSSupport
Participating Experts: 2
Solution Grade: A
 
 
Loading Advertisement...
20091021-EE-VQP-81 / EE_QW_2_20070628