Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Jun 25, 2019 10:57 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Rittal-CMC
PostPosted: Fri Mar 18, 2005 4:10 am 
Offline
Cacti User

Joined: Mon Jun 21, 2004 4:06 am
Posts: 124
Location: North of the Netherlands
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:
File comment: Host template for Rittal-CMC temp and humidity sensors.
cacti_host_template_rittalcmc.xml [161.81 KiB]
Downloaded 2419 times
Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 12, 2006 6:33 am 
Offline

Joined: Sat Aug 12, 2006 6:31 am
Posts: 3
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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 29, 2006 5:43 pm 
Offline

Joined: Sat Aug 12, 2006 6:31 am
Posts: 3
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.


Top
 Profile  
 
 Post subject: Exported the file again from 0.8.6i
PostPosted: Mon Oct 30, 2006 4:10 am 
Offline
Cacti User

Joined: Mon Jun 21, 2004 4:06 am
Posts: 124
Location: North of the Netherlands
Hello,

Exported the file again but now from 0.8.6i. Hope you are now able to import the file.


Attachments:
File comment: Exported from 0.8.6i
cacti_host_template_rittalcmc.xml [188.79 KiB]
Downloaded 1714 times
Top
 Profile  
 
 Post subject: Indexed CMC Template
PostPosted: Tue Oct 31, 2006 9:16 am 
Offline
Cacti User

Joined: Mon Jun 21, 2004 4:06 am
Posts: 124
Location: North of the Netherlands
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:
File comment: New version of the rittal cmc host template
cacti_host_template_rittalcmc(2).xml [180.64 KiB]
Downloaded 2138 times
Top
 Profile  
 
 Post subject: The needed XML file
PostPosted: Wed Nov 01, 2006 5:09 am 
Offline
Cacti User

Joined: Mon Jun 21, 2004 4:06 am
Posts: 124
Location: North of the Netherlands
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:
<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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 22, 2006 8:45 am 
Offline

Joined: Wed Nov 22, 2006 8:43 am
Posts: 2
Location: Jyvaskyla, Finland
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 24, 2006 5:00 am 
Offline
Cacti User

Joined: Mon Jun 21, 2004 4:06 am
Posts: 124
Location: North of the Netherlands
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 24, 2006 7:25 am 
Offline

Joined: Wed Nov 22, 2006 8:43 am
Posts: 2
Location: Jyvaskyla, Finland
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 :)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 18, 2009 2:29 pm 
Offline

Joined: Sat Jul 26, 2008 10:41 am
Posts: 10
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:
<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:
<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:
<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:
<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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 09, 2009 12:45 pm 
Offline

Joined: Mon Nov 09, 2009 12:39 pm
Posts: 3
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)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 10, 2009 4:12 am 
Offline
Cacti User

Joined: Mon Jun 21, 2004 4:06 am
Posts: 124
Location: North of the Netherlands
@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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 11, 2009 2:07 am 
Offline

Joined: Mon Nov 09, 2009 12:39 pm
Posts: 3
Ok. I'll look into it. Yesterday I did this workaround:

Code:
#!/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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 11, 2009 4:50 am 
Offline

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


Top
 Profile  
 
 Post subject: Re: Rittal-CMC
PostPosted: Thu Apr 28, 2011 8:33 am 
Offline

Joined: Thu Apr 28, 2011 8:18 am
Posts: 1
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group