If you didn’t have this issue this update won’t do anything useful for you □ Version 1.3: minor change to PNP templates - Nico Weinreich informed me that his fan templates weren’t working correctly so I updated the regular expression used to match corresponding sensor types. Thanks to Cyril Pawelko for finding the issue and helping with testing! Version 1.2: changed sed to perl in agent plugin, sensornames with more than one space (among things) were giving issues. Let Check_MK do an inventory on your remote machine and the rest goes automagically! □Īnd now we have pretty graphs for my sensors. You can find it in the check_mk_agent script if you don’t grep MK_LIBDIR `which check_mk_agent`Įxport MK_LIBDIR="/usr/lib/check_mk_agent" In my case, this was /usr/lib/check_mk_agent/plugins, but it could very well be somewhere else on your system. Since this is only a single file it’s trivial to scp /usr/share/check_mk/agents/lmsensors that the place you want to put that thing in is the $MK_LIBDIR/plugins directory. Now for a remote machine you will need to put the agent in place. Soon there will be pretty graphs for this machine □ #Lmsensors fancontrol install install#This is quickly wget md5sum lmsensors-1.4.mkpġ15bd50557d1db7e934baa64e172e506 check_mk -vP install lmsensors-1.4.mkpĭone. First on the host that actually runs check_mk we need to install the package. There are two parts to installing a Check MK plugin. Now repeat this process for all sensors □ (might need sensors sensorsĬPU Voltage: +1.31 V (min = +1.00 V, max = +2.00 V) Here’s an example for renaming in0 to “CPU Voltage” and turning off the second fan since it’s not connected.Īlso we’ll change the minimum and maximum voltage for the CPU Voltage - this determines when nagios will send out an alarm or not:Īfter changing the sensors file you’ll need to make lmsensors aware of the configuration change by running ‘sensors -s’. Now edit the nf file and add a sectionįor this adapter if it isn’t already there. To change labels or ignore certain sensors because they give bogus data (not connected etc), first find your adapter type. The default names like ‘in0’ will also work, but something like ‘Pizza sensor’ obviously won’t. For instance label the temperature sensors with ‘temp’ or ‘temperature’. In order for the check_mk plugin templates to recognize the type you’ll need to make sure they have some kind of indication of the type of sensor. Don’t ask me what voltage corresponds with what sensor on your mainboard, but you can rename the sensor output by editing /etc/nf or /etc/nf depending on your flavor of linux. You might see things like ‘in0’ instead of ‘CPU Voltage’. Fortunately this will often work out of the box.Īfter making sure you have sensors and that running ‘sensors’ will give output like sensors Note that you obviously need some kind of hardware sensor on your machine that’s supported by lm-sensors for it to work, including the required kernel module. This normally comes in a package called “lmsensors” or “lm-sensors”. Therefore I molested the names a bit, so your sensor might now be simply called MB12V instead of M/B+12V.įor my plugin to work you need to make sure that you have the ‘sensors’ tool. This created the files Sensor_+12V.rrd and corresponding xml, but when one would go to the PNP4Nagios graph of that sensor it would request a file called Sensor_12V.rrd, which obviously failed. #Lmsensors fancontrol install plus#One of the issues I ran into while writing the plugin was that PNP4Nagios fails on service names that have a plus character in them. Writing python isn’t my strongest point (yet), but these are good opportunities to learn. Since these plugins are very easy to install (once you’ve got check_mk up and running that is) and still nobody had written one for lmsensors, I decided to do it myself. Thus it’s a good source for making pretty graphs □ In case you don’t know, it gives the temperature and voltage of your CPU and mainboard. Most machines support this out of the box these days, and it’s always interesting to see the conditions of your machine. ‘Package’) for Check_MK in order to monitor (and make pretty graphs!) of the sensor output of lmsensors. On the subject of Pretty Graphs (see my earlier post), I decided to write a plugin (a.k.a.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |