Rittal-CMC
Moderators: Developers, Moderators
Rittal-CMC
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
Michael
- Attachments
-
- cacti_host_template_rittalcmc.xml
- Host template for Rittal-CMC temp and humidity sensors.
- (161.81 KiB) Downloaded 3072 times
Exported the file again from 0.8.6i
Hello,
Exported the file again but now from 0.8.6i. Hope you are now able to import the file.
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
Indexed CMC Template
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.
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
The needed XML file
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.
save this file as cmc.xml in the resources/snmp_queries directory
Michael
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>
Michael
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:
Here it is for Port 2:
And here followes Port 3
And last not least, Port 4
So, hope it helps to get some more fun out of the PU network.
Best regards,
Ulrich
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>
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>
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>
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>
Best regards,
Ulrich
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)
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)
@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
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
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
Re: Rittal-CMC
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.
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.
Who is online
Users browsing this forum: No registered users and 7 guests