Rittal-CMC

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

Rittal-CMC

Post by mgb »

I Created a simple template for a rittal temperature and humidity sensor. It's just quick and dirty but works fine for me. Fankly I should have created a script to detect all the different sensors and name them accordingly but that's something in the future. Make sure the ip of the cacti machine is in the allowed list.

Michael
Attachments
cacti_host_template_rittalcmc.xml
Host template for Rittal-CMC temp and humidity sensors.
(161.81 KiB) Downloaded 3072 times
fmorelle
Posts: 3
Joined: Sat Aug 12, 2006 6:31 am

Post by fmorelle »

Hello,

I got a rittal CMC unit but I don't know how to activate snmp function.

Can you please explain how I should configure the CMC to collect information with cacti ?

Thanks
fmorelle
Posts: 3
Joined: Sat Aug 12, 2006 6:31 am

Post by fmorelle »

Hello,

I found the way to activate snmp on the rittal CMC but I can't import the xml, I got a parse error.

Is there an updated version of this file ?

Thanks.
mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

Exported the file again from 0.8.6i

Post by mgb »

Hello,

Exported the file again but now from 0.8.6i. Hope you are now able to import the file.
Attachments
cacti_host_template_rittalcmc.xml
Exported from 0.8.6i
(188.79 KiB) Downloaded 2400 times
mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

Indexed CMC Template

Post by mgb »

This time a somewhat smarter template for the rittal cmc unit.
This time it will also show you the minimum and maximum thresholds and the warning level.
Attachments
cacti_host_template_rittalcmc(2).xml
New version of the rittal cmc host template
(180.64 KiB) Downloaded 2757 times
mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

The needed XML file

Post by mgb »

Here is the code for the needed xml file for the cmc.
Changes to this version regarding the old version:

able to use all interfaces.
auto detect the probe type
upper, lower and warning limits are graphed as lines

This version has no support for a cascade of CMC devices.

Code: Select all

<interface>
        <name>Get CMC Sensors</name>
        <description>Queries a cmc unit for the number of possible sensors</description>
        <oid_index>.1.3.6.1.4.1.2606.4.2.3.5.2.1.1</oid_index>
        <oid_num_indexes>.1.3.6.1.4.1.2606.4.2.3.5.1.0</oid_num_indexes>
        <index_order>CMCSensorType:CMCSensorText:CMCSensorIndex</index_order>
        <index_order_type>numeric</index_order_type>
        <index_title_format>|chosen_order_field|</index_title_format>

        <fields>
                <CMCSensorIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.1</oid>
                </CMCSensorIndex>
                <CMCSensorType>
                        <name>Type</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.2</oid>
                </CMCSensorType>
                <CMCSensorText>
                        <name>Text</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.3</oid>
                </CMCSensorText>
                <CMCSensorStatus>
                        <name>Status</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.4</oid>
                </CMCSensorStatus>
                <CMCSensorValue>
                        <name>Value</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.5</oid>
                </CMCSensorValue>
                <CMCSensorSetHigh>
                        <name>SetHigh</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.6</oid>
                </CMCSensorSetHigh>
                <CMCSensorSetLow>
                        <name>SetLow</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.7</oid>
                </CMCSensorSetLow>
                <CMCSensorSetWarn>
                        <name>SetWarn</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.8</oid>
                </CMCSensorSetWarn>
        </fields>
</interface>
save this file as cmc.xml in the resources/snmp_queries directory

Michael
Skotsh
Posts: 2
Joined: Wed Nov 22, 2006 8:43 am
Location: Jyvaskyla, Finland

Post by Skotsh »

Hi,

How I can add other ports from Process Unit? Currently that template shows only Port 1 stuff (4 sensors total) and I have stuff in all ports..

- Marko
mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

Post by mgb »

Did you use the new version? Although this one should read all the different ports on 1 cmc, it can't work with cascaded devices.

Michael
Skotsh
Posts: 2
Joined: Wed Nov 22, 2006 8:43 am
Location: Jyvaskyla, Finland

Post by Skotsh »

Yep, now I get all 4 ports work from PU, needed to create cmc2,3,4 .xml files and modify correct oid's to them :) Thanks for this cool template :)
Astralix
Posts: 10
Joined: Sat Jul 26, 2008 10:41 am

Post by Astralix »

I would prefer to have a sort of input variable to the XML files, but I don't know if that is possible. Otherwise one could pass the sub OID for Port selection to the data source and thereby select the Port.

But I modified the XML somewhat for your comfort:
Instead of SensorText to be the Sensor type as a string, my version issues the SensorName instead. So if one sets up a descriptve name for a certain sensor, Cacti will show it automatically for the sensors name if you set up the datasources with for instance:
|host_description| - |query_CMCSensorText|

So even if you rename sensors later inside the configuration menue of the CMC-PU, the new names will show up in the graphs.

Another Change is, that I defined High, Low and Warn as outputs too. These values can only be changed by the CMC-PU itself and therefor only be read by cacti. But they could easily be inserted as lines in the graphs to give some more visual options of control.

So here is the XML import for any CMC-PU-II with sensors ( IO-Unit or Wireless-Unit) on Port 1:

Code: Select all

<interface> 
         <name>Get CMC Sensors on Port 1</name> 
         <description>Queries a cmc unit for the number of possible sensors</description> 
         <oid_index>.1.3.6.1.4.1.2606.4.2.3.5.2.1.1</oid_index> 
         <oid_num_indexes>.1.3.6.1.4.1.2606.4.2.3.5.1.0</oid_num_indexes> 
         <index_order>CMCSensorType:CMCSensorText:CMCSensorIndex</index_order> 
         <index_order_type>numeric</index_order_type> 
         <index_title_format>|chosen_order_field|</index_title_format> 
 
         <fields> 
                 <CMCSensorIndex> 
                         <name>Index</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>input</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.1</oid> 
                 </CMCSensorIndex> 
                 <CMCSensorType> 
                         <name>Type</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>input</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.2</oid> 
                 </CMCSensorType> 
                 <CMCSensorText> 
                         <name>Text</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>input</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.3.7.2.1.2</oid> 
                 </CMCSensorText> 
                 <CMCSensorStatus> 
                         <name>Status</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.4</oid> 
                 </CMCSensorStatus> 
                 <CMCSensorValue> 
                         <name>Value</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.5</oid> 
                 </CMCSensorValue> 
                 <CMCSensorSetHigh> 
                         <name>SetHigh</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.6</oid> 
                 </CMCSensorSetHigh> 
                 <CMCSensorSetLow> 
                         <name>SetLow</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.7</oid> 
                 </CMCSensorSetLow> 
                 <CMCSensorSetWarn> 
                         <name>SetWarn</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.3.5.2.1.8</oid> 
                 </CMCSensorSetWarn> 
         </fields> 
 </interface>  
Here it is for Port 2:

Code: Select all

<interface> 
         <name>Get CMC Sensors on Port 2</name> 
         <description>Queries a cmc unit for the number of possible sensors</description> 
         <oid_index>.1.3.6.1.4.1.2606.4.2.4.5.2.1.1</oid_index> 
         <oid_num_indexes>.1.3.6.1.4.1.2606.4.2.4.5.1.0</oid_num_indexes> 
         <index_order>CMCSensorType:CMCSensorText:CMCSensorIndex</index_order> 
         <index_order_type>numeric</index_order_type> 
         <index_title_format>|chosen_order_field|</index_title_format> 
 
         <fields> 
                 <CMCSensorIndex> 
                         <name>Index</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>input</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.4.5.2.1.1</oid> 
                 </CMCSensorIndex> 
                 <CMCSensorType> 
                         <name>Type</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>input</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.4.5.2.1.2</oid> 
                 </CMCSensorType> 
                 <CMCSensorText> 
                         <name>Text</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>input</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.4.7.2.1.2</oid> 
                 </CMCSensorText> 
                 <CMCSensorStatus> 
                         <name>Status</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.4.5.2.1.4</oid> 
                 </CMCSensorStatus> 
                 <CMCSensorValue> 
                         <name>Value</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.4.5.2.1.5</oid> 
                 </CMCSensorValue> 
                 <CMCSensorSetHigh> 
                         <name>SetHigh</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.4.5.2.1.6</oid> 
                 </CMCSensorSetHigh> 
                 <CMCSensorSetLow> 
                         <name>SetLow</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.4.5.2.1.7</oid> 
                 </CMCSensorSetLow> 
                 <CMCSensorSetWarn> 
                         <name>SetWarn</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.4.5.2.1.8</oid> 
                 </CMCSensorSetWarn> 
         </fields> 
 </interface>  
And here followes Port 3

Code: Select all

<interface> 
         <name>Get CMC Sensors on Port 3</name> 
         <description>Queries a cmc unit for the number of possible sensors</description> 
         <oid_index>.1.3.6.1.4.1.2606.4.2.5.5.2.1.1</oid_index> 
         <oid_num_indexes>.1.3.6.1.4.1.2606.4.2.5.5.1.0</oid_num_indexes> 
         <index_order>CMCSensorType:CMCSensorText:CMCSensorIndex</index_order> 
         <index_order_type>numeric</index_order_type> 
         <index_title_format>|chosen_order_field|</index_title_format> 
 
         <fields> 
                 <CMCSensorIndex> 
                         <name>Index</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>input</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.5.5.2.1.1</oid> 
                 </CMCSensorIndex> 
                 <CMCSensorType> 
                         <name>Type</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>input</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.5.5.2.1.2</oid> 
                 </CMCSensorType> 
                 <CMCSensorText> 
                         <name>Text</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>input</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.5.7.2.1.2</oid> 
                 </CMCSensorText> 
                 <CMCSensorStatus> 
                         <name>Status</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.5.5.2.1.4</oid> 
                 </CMCSensorStatus> 
                 <CMCSensorValue> 
                         <name>Value</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.5.5.2.1.5</oid> 
                 </CMCSensorValue> 
                 <CMCSensorSetHigh> 
                         <name>SetHigh</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.5.5.2.1.6</oid> 
                 </CMCSensorSetHigh> 
                 <CMCSensorSetLow> 
                         <name>SetLow</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.5.5.2.1.7</oid> 
                 </CMCSensorSetLow> 
                 <CMCSensorSetWarn> 
                         <name>SetWarn</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.5.5.2.1.8</oid> 
                 </CMCSensorSetWarn> 
         </fields> 
 </interface>  
And last not least, Port 4

Code: Select all

<interface> 
         <name>Get CMC Sensors on Port 4</name> 
         <description>Queries a cmc unit for the number of possible sensors</description> 
         <oid_index>.1.3.6.1.4.1.2606.4.2.6.5.2.1.1</oid_index> 
         <oid_num_indexes>.1.3.6.1.4.1.2606.4.2.6.5.1.0</oid_num_indexes> 
         <index_order>CMCSensorType:CMCSensorText:CMCSensorIndex</index_order> 
         <index_order_type>numeric</index_order_type> 
         <index_title_format>|chosen_order_field|</index_title_format> 
 
         <fields> 
                 <CMCSensorIndex> 
                         <name>Index</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>input</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.6.5.2.1.1</oid> 
                 </CMCSensorIndex> 
                 <CMCSensorType> 
                         <name>Type</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>input</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.6.5.2.1.2</oid> 
                 </CMCSensorType> 
                 <CMCSensorText> 
                         <name>Text</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>input</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.6.7.2.1.2</oid> 
                 </CMCSensorText> 
                 <CMCSensorStatus> 
                         <name>Status</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.6.5.2.1.4</oid> 
                 </CMCSensorStatus> 
                 <CMCSensorValue> 
                         <name>Value</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.6.5.2.1.5</oid> 
                 </CMCSensorValue> 
                 <CMCSensorSetHigh> 
                         <name>SetHigh</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.6.5.2.1.6</oid> 
                 </CMCSensorSetHigh> 
                 <CMCSensorSetLow> 
                         <name>SetLow</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.6.5.2.1.7</oid> 
                 </CMCSensorSetLow> 
                 <CMCSensorSetWarn> 
                         <name>SetWarn</name> 
                         <method>walk</method> 
                         <source>value</source> 
                         <direction>output</direction> 
                         <oid>.1.3.6.1.4.1.2606.4.2.6.5.2.1.8</oid> 
                 </CMCSensorSetWarn> 
         </fields> 
 </interface>  
So, hope it helps to get some more fun out of the PU network.

Best regards,
Ulrich
sjobbe
Posts: 3
Joined: Mon Nov 09, 2009 12:39 pm

Post by sjobbe »

Nice! I've added these to our systems and its working fine. However, at the moment i'm only logging total utilization of elektricity (kW). It would be nice to see that all three phases are equally utilized on the same graph. Is this possible?

In short: How can I get these into the same graph:
1.3.6.1.4.1.2606.4.2.x.5.2.1.5.2 (total)
1.3.6.1.4.1.2606.4.2.x.5.2.1.5.16 (L1)
1.3.6.1.4.1.2606.4.2.x.5.2.1.5.17 (L2)
1.3.6.1.4.1.2606.4.2.x.5.2.1.5.18 (L3)

(the x above has the value 3 to 6 for the four different units that can be connected)
mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

Post by mgb »

@Sjobbe

If you look into the graph templates for interfaces you see two values in the same graph (In and Out traffic). Using such a template as a base it's easy to add more datasources as input and put all the values you want into the same graph. You might want to use line instead of area for the graphs.

Michael
sjobbe
Posts: 3
Joined: Mon Nov 09, 2009 12:39 pm

Post by sjobbe »

Ok. I'll look into it. Yesterday I did this workaround:

Code: Select all

#!/bin/sh

aflag=
bflag=

while getopts 'i:r:' OPTION
do
  case $OPTION in
  i)    aflag=1
                aval="$OPTARG"
                ;;
  r)    bflag=1
                bval="$OPTARG"
                ;;
  esac
done
shift $(($OPTIND - 1))

if [ "$aflag" ] && [ "$bflag" ]
then
  if [ $bval -eq "1" ]
  then
    bval=3
  elif [ $bval -eq "2" ]
  then
    bval=4
  elif [ $bval -eq "3" ]
  then
    bval=5
  elif [ $bval -eq "4" ]
  then
    bval=6
  else
    exit 2
  fi
  snmp="/usr/bin/snmpget -v 1 -c public $aval 1.3.6.1.4.1.2606.4.2.$bval.5.2.1.5.2 1.3.6.1.4.1.2606.4.2.$bval.5.2.1.5.16 1.3.6.1.4.1.2606.4.2.$bval.5.2.1.5.17 1.3.6.1.4.1.2606.4.2.$bval.5.2.1.5.18"
  $snmp 2> /dev/null | tr '\n' ' \n' | awk '{print "tot:" $4 " l1:" $8 " l2:" $12 " l3:" $16}'
else
  printf "Usage: %s: [-i IP] [-r RACK]\n" $(basename $0) >&2
  exit 2
fi
sjobbe
Posts: 3
Joined: Mon Nov 09, 2009 12:39 pm

Post by sjobbe »

--
tws
Posts: 1
Joined: Thu Apr 28, 2011 8:18 am

Re: Rittal-CMC

Post by tws »

Hi,

I am using the template and the associated cmc.xml file from this post provided by mgb and it is running fine. Now I want to add the other ports of my Rittal device to be also tracked by cacti. I took the cmc.xml, copied it to cmc2.xml and modified only the OIDs so that they match to the OIDs of the second port of the device. I left everything else in the file untouched. Finally I added the cmc2.xml as a data query and associated it to the device in order to be monitored but for some reasons the rra file is not generated. I had a look into the log and it shows that cacti ist not even querying any OID of the second port of my device while the first one is still running fine - however the verbose query of the data source was successful.

I am sure that I am missing an obvious important part, but I do not get it at the moment. Any hints on this?

Many Thanks,
Thomas.
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests