Templates for FreeBSD
Moderators: Developers, Moderators
Re: Templates for FreeBSD
Here is a small upgrade for those of you who uses Net-SNMP instead of bsnmpd. It includes adaptation for regular SATA HDD (/dev/ada*) without any kind of RAID too. Sorry, but it was not tested thoroughly. So use it on your own risk Thanks to macan for his great job.
- Attachments
-
- net-snmp.tgz
- (6.52 KiB) Downloaded 485 times
Re: Templates for FreeBSD
Thank you,dansoft wrote:Here is a small upgrade for those of you who uses Net-SNMP instead of bsnmpd. It includes adaptation for regular SATA HDD (/dev/ada*) without any kind of RAID too. Sorry, but it was not tested thoroughly. So use it on your own risk Thanks to macan for his great job.
In few day will be released new version.
Main changes:
- tcp connection stats
- mail/spam stats
- named stats
Fix:
- apc ups - add temperature
- disk (adX, adaX, ..)
bsnmp optimalization for slow server
...
Let the Cacti grow!
Re: Templates for FreeBSD
Version 2 examples
- Attachments
-
- Spam stats
- mail_stats.png (39.86 KiB) Viewed 5876 times
-
- TCP connections
- tcp_connection.png (45.15 KiB) Viewed 5876 times
-
- Mail stats
- mailstats_count.png (60.92 KiB) Viewed 5876 times
Let the Cacti grow!
Re: Templates for FreeBSD
uoops!
I forget add snmp v3 support. I will fix it asap
I forget add snmp v3 support. I will fix it asap
Let the Cacti grow!
Re: Templates for FreeBSD
Hello. Im trying to use your template to just get the temperature of our PfSense Box at each of our locations. I cant seem to be able to get the temperature, even thou I did everything you stated in your template details.
Ive attached a snmpwalk printout of my PfSense box. It shows temperature, but not sure how to change your template (if needed) to get this data. Is it possible you could help me?
When I login to the PfSense GUI, I can see the temperature with no problem (so the OS is giving out the temp reading), but I want that info in my Cacti Server, so that I can get a warning when the temp is too high.
Thanks...
Ive attached a snmpwalk printout of my PfSense box. It shows temperature, but not sure how to change your template (if needed) to get this data. Is it possible you could help me?
When I login to the PfSense GUI, I can see the temperature with no problem (so the OS is giving out the temp reading), but I want that info in my Cacti Server, so that I can get a warning when the temp is too high.
Thanks...
- Attachments
-
- PfSense.txt
- (221.14 KiB) Downloaded 369 times
Re: Templates for FreeBSD
Hi,Cornel wrote:Hello. Im trying to use your template to just get the temperature of our PfSense Box at each of our locations. I cant seem to be able to get the temperature, even thou I did everything you stated in your template details.
Ive attached a snmpwalk printout of my PfSense box. It shows temperature, but not sure how to change your template (if needed) to get this data. Is it possible you could help me?
When I login to the PfSense GUI, I can see the temperature with no problem (so the OS is giving out the temp reading), but I want that info in my Cacti Server, so that I can get a warning when the temp is too high.
Thanks...
my template collects temperature value from APC UPS only. If you haven't APC, you can try another ways:
1) if you find temperature in your snmpwalk (I don't see it), you can create single graph (Console -> device -> Add graph and in Graph template choose SNMP - generic OID template)
2) if your hw supports this:
sysctl hw.acpi.thermal
hw.acpi.thermal.tz0.temperature: 33,0C
You can edit my part of /etc/snmpd.config:
extNames.66 = "temp"
extCommand.66 = "/sbin/sysctl hw.acpi.thermal | /bin/grep temperature | /bin/cut -d " " -f 2 | /bin/cut -d "," -f 1"
And create graph (the same as point 1) for OID .1.3.6.1.4.1.2021.8.1.101.66
Let the Cacti grow!
Re: Templates for FreeBSD
Thank you my friend. lll try that and see if it works. When I try to do a smnpwalk, I don't see anything, so not sure it will even support it.macan wrote:Hi,Cornel wrote:Hello. Im trying to use your template to just get the temperature of our PfSense Box at each of our locations. I cant seem to be able to get the temperature, even thou I did everything you stated in your template details.
Ive attached a snmpwalk printout of my PfSense box. It shows temperature, but not sure how to change your template (if needed) to get this data. Is it possible you could help me?
When I login to the PfSense GUI, I can see the temperature with no problem (so the OS is giving out the temp reading), but I want that info in my Cacti Server, so that I can get a warning when the temp is too high.
Thanks...
my template collects temperature value from APC UPS only. If you haven't APC, you can try another ways:
1) if you find temperature in your snmpwalk (I don't see it), you can create single graph (Console -> device -> Add graph and in Graph template choose SNMP - generic OID template)
2) if your hw supports this:
sysctl hw.acpi.thermal
hw.acpi.thermal.tz0.temperature: 33,0C
You can edit my part of /etc/snmpd.config:
extNames.66 = "temp"
extCommand.66 = "/sbin/sysctl hw.acpi.thermal | /bin/grep temperature | /bin/cut -d " " -f 2 | /bin/cut -d "," -f 1"
And create graph (the same as point 1) for OID .1.3.6.1.4.1.2021.8.1.101.66
Re: Templates for FreeBSD
[/quote]Cornel wrote: Thank you my friend. lll try that and see if it works. When I try to do a smnpwalk, I don't see anything, so not sure it will even support it.
Hi Cornel,
I don't use PFsense, maybe it is possible in /etc/snmpd.config uncomment any module, which works with temperature.
If you have temperature in any log, you can install and use /usr/ports/net-mgmt/bsnmp-regex. And again - create Single OID graph.
Please, let me know how you solved this problem. Thank you
Let the Cacti grow!
Re: Templates for FreeBSD
Ok, purely and utterly new to cacti. I am using the freebsd template made by mancan (really big thanks for it by the way)
but I cant seem to get it to work properly. I am fairly sure that it is not the template in itself that is erroneous as it seems
that so many people have got it to work, but rather there might be some trick in there that I haven't been able to find
that others might already know about and hence doesnt comment on.
First things first. As I said, I am trying out cacti, wich is installed on a freebsd machine using 9.3, this seems to work
as it can monitor one of my linux machines perfectly, all is well there. But when it comes to freebsd, I cant
seem to get graphs for a lot of things using this set of templates.
Now, I checked and doublechecked on the machine that is to be monitored
but im almost tearing my hair out on this one and I really want this to work but I am out
of ideas.
I did follow the readme, double checked the steps. Using all defaults as to not mess things up
and still, cant get "files" nor tcp connections and a few others to work and all i get into
my face is
any clues as to where i might have steered wrong, and also, if you want any more information from various logs, just
let me know what you want to see and I will show it.
but I cant seem to get it to work properly. I am fairly sure that it is not the template in itself that is erroneous as it seems
that so many people have got it to work, but rather there might be some trick in there that I haven't been able to find
that others might already know about and hence doesnt comment on.
First things first. As I said, I am trying out cacti, wich is installed on a freebsd machine using 9.3, this seems to work
as it can monitor one of my linux machines perfectly, all is well there. But when it comes to freebsd, I cant
seem to get graphs for a lot of things using this set of templates.
Now, I checked and doublechecked on the machine that is to be monitored
but im almost tearing my hair out on this one and I really want this to work but I am out
of ideas.
I did follow the readme, double checked the steps. Using all defaults as to not mess things up
and still, cant get "files" nor tcp connections and a few others to work and all i get into
my face is
Code: Select all
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[148] WARNING: Result from SNMP not valid. Partial Result: U
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[147] WARNING: Result from SNMP not valid. Partial Result: U
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[146] WARNING: Result from SNMP not valid. Partial Result: U
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[145] WARNING: Result from SNMP not valid. Partial Result: U
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[144] WARNING: Result from SNMP not valid. Partial Result: U
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[143] WARNING: Result from SNMP not valid. Partial Result: U
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[142] WARNING: Result from SNMP not valid. Partial Result: U
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[141] WARNING: Result from SNMP not valid. Partial Result: U
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[140] WARNING: Result from SNMP not valid. Partial Result: U
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[137] WARNING: Result from SNMP not valid. Partial Result: U
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[136] WARNING: Result from SNMP not valid. Partial Result: U
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[135] WARNING: Result from SNMP not valid. Partial Result: U
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[134] WARNING: Result from SERVER not valid. Partial Result: U
let me know what you want to see and I will show it.
Re: Templates for FreeBSD
Hi,zutgorak wrote:Ok, purely and utterly new to cacti. I am using the freebsd template made by mancan (really big thanks for it by the way)
but I cant seem to get it to work properly. I am fairly sure that it is not the template in itself that is erroneous as it seems
that so many people have got it to work, but rather there might be some trick in there that I haven't been able to find
that others might already know about and hence doesnt comment on.
First things first. As I said, I am trying out cacti, wich is installed on a freebsd machine using 9.3, this seems to work
as it can monitor one of my linux machines perfectly, all is well there. But when it comes to freebsd, I cant
seem to get graphs for a lot of things using this set of templates.
Now, I checked and doublechecked on the machine that is to be monitored
but im almost tearing my hair out on this one and I really want this to work but I am out
of ideas.
I did follow the readme, double checked the steps. Using all defaults as to not mess things up
and still, cant get "files" nor tcp connections and a few others to work and all i get into
my face is
any clues as to where i might have steered wrong, and also, if you want any more information from various logs, justCode: Select all
01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[148] WARNING: Result from SNMP not valid. Partial Result: U 01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[147] WARNING: Result from SNMP not valid. Partial Result: U 01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[146] WARNING: Result from SNMP not valid. Partial Result: U 01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[145] WARNING: Result from SNMP not valid. Partial Result: U 01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[144] WARNING: Result from SNMP not valid. Partial Result: U 01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[143] WARNING: Result from SNMP not valid. Partial Result: U 01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[142] WARNING: Result from SNMP not valid. Partial Result: U 01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[141] WARNING: Result from SNMP not valid. Partial Result: U 01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[140] WARNING: Result from SNMP not valid. Partial Result: U 01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[137] WARNING: Result from SNMP not valid. Partial Result: U 01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[136] WARNING: Result from SNMP not valid. Partial Result: U 01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[135] WARNING: Result from SNMP not valid. Partial Result: U 01/07/2015 01:35:00 PM - CMDPHP: Poller[0] Host[7] DS[134] WARNING: Result from SERVER not valid. Partial Result: U
let me know what you want to see and I will show it.
please send me:
1) /etc/snmpd.config
2) output from command pkg_info | grep snmp (or pkg info | grep snmp if you use new pkg)
3) few rows from command snmpwalk -v1 -c your_public server_address .1.3.6.1.4.1.2021.8
Let the Cacti grow!
Re: Templates for FreeBSD
Anybody happen to know if this works without tweaking with net-snmp also? I prefer the net-snmp port over the native bsdnsmp implementation.
Re: Templates for FreeBSD
Regarding the issue "Result from SNMP not valid. Partial Result: U":
It turned out that the cacti poller resp. cmd.php wasn't able to start the required external perl interpreter due to a tricky change in the recent perl ports.
After upgrading my perl interpreter to v5.20, the executable is no longer installed as /usr/bin/perl, but now as /usr/local/bin/perl
Because the poller is started from the /etc/crontab, you'd better check if the PATH setting in your crontab includes /usr/local/bin.
If not, you may be inclined to add that path, or otherwise make sure that the perl interpreter is found by cmd.php
Unfortunately, this issue was a little bit ugly to identify - even cacti's DEVEL level logging didn't give a clue.
Hope that helps you around.
Had similar issue with a fresh install of cacti 0.8.8 on FreeBSD 10.1 as well.Ok, purely and utterly new to cacti. I am using the freebsd template made by mancan (really big thanks for it by the way)
but I cant seem to get it to work properly. I am fairly sure that it is not the template in itself that is erroneous as it seems
that so many people have got it to work, but rather there might be some trick in there that I haven't been able to find
that others might already know about and hence doesnt comment on.
First things first. As I said, I am trying out cacti, wich is installed on a freebsd machine using 9.3, this seems to work
as it can monitor one of my linux machines perfectly, all is well there. But when it comes to freebsd, I cant
seem to get graphs for a lot of things using this set of templates.
Now, I checked and doublechecked on the machine that is to be monitored
but im almost tearing my hair out on this one and I really want this to work but I am out
of ideas.
It turned out that the cacti poller resp. cmd.php wasn't able to start the required external perl interpreter due to a tricky change in the recent perl ports.
After upgrading my perl interpreter to v5.20, the executable is no longer installed as /usr/bin/perl, but now as /usr/local/bin/perl
Because the poller is started from the /etc/crontab, you'd better check if the PATH setting in your crontab includes /usr/local/bin.
If not, you may be inclined to add that path, or otherwise make sure that the perl interpreter is found by cmd.php
Unfortunately, this issue was a little bit ugly to identify - even cacti's DEVEL level logging didn't give a clue.
Hope that helps you around.
Re: Templates for FreeBSD
Not to be a smart ass but that "tricky change" was noted in both /usr/ports/UPDATING and /usr/src/UPDATING
20150513:
AFFECTS: users of lang/perl5*
AUTHOR: mat@FreeBSD.org
The default Perl version has been switched to Perl 5.20. If you are using
binary packages to upgrade your system, you do not have anything to do, pkg
upgrade will do the right thing. For the other people, assuming you are
migrating from 5.18 to 5.20, do:
Portupgrade users:
portupgrade -o lang/perl5.20 -f lang/perl5.18
portupgrade -f `pkg shlib -R libperl.so.5.18|tail +2`
Portmaster users:
portmaster -o lang/perl5.20 lang/perl5.18
portmaster -f `pkg shlib -R libperl.so.5.18|tail +2`
NOTE:
Perl has been removed from base more than ten years ago, so it was way past
time for the /usr/bin/perl symlink to be removed from the port. If for
some strange reason, you still need it, you will have to create it
manually.
Re: Templates for FreeBSD
Hello, first of all tanks for the template, it helped a lot.
Second, sorry for my English
Because it didn't do temperatures, and it was pretty important for me, i did it myself, so i'l post it here, if someone else want's to use it. I did it for myself so i didn't make it to versatile, but it should't need to much modifications to work.
my configuration is a hexacore intel i7 cpu
I have 4 Samsung SSD , and 1 normal HD
Freebsd 11
Cacti Versiun 1.0.1
What else is requiered :
kernel module for cpu temperature , execute "kldload coretemp" or add it at boot up.
smartctl for HDD temperature : install /usr/ports/sysutils/smartmontools/
What you should modify:
check "sysctl dev.cpu.0.coretemp.tjmax" if this is 105 , if not, modify in /usr/local/bin/cacti_devil_cpu_temp.sh the value 105 to your value.
In my case the hexacore is with Hyper-threading that's why i don't use core temperatures of cores 1,3,5,7,9 because it's the same as the one before being the same physical cpu core.
Modify the values in /etc/snmpd.config for ada0, ada1 ..... to your hardrivers.
and all should be ok
Added to /etc/snmpd.config
Script
/usr/local/bin/cacti_devil_cpu_temp.sh
/usr/local/bin/cacti_devil_hd_temp.sh
i allso attached my xml-s
Second, sorry for my English
Because it didn't do temperatures, and it was pretty important for me, i did it myself, so i'l post it here, if someone else want's to use it. I did it for myself so i didn't make it to versatile, but it should't need to much modifications to work.
my configuration is a hexacore intel i7 cpu
I have 4 Samsung SSD , and 1 normal HD
Freebsd 11
Cacti Versiun 1.0.1
What else is requiered :
kernel module for cpu temperature , execute "kldload coretemp" or add it at boot up.
smartctl for HDD temperature : install /usr/ports/sysutils/smartmontools/
What you should modify:
check "sysctl dev.cpu.0.coretemp.tjmax" if this is 105 , if not, modify in /usr/local/bin/cacti_devil_cpu_temp.sh the value 105 to your value.
In my case the hexacore is with Hyper-threading that's why i don't use core temperatures of cores 1,3,5,7,9 because it's the same as the one before being the same physical cpu core.
Modify the values in /etc/snmpd.config for ada0, ada1 ..... to your hardrivers.
and all should be ok
Added to /etc/snmpd.config
Code: Select all
extNames.67 = "CPU 0 - TEMP"
extCommand.67 = "/usr/local/bin/cacti_devil_cpu_temp.sh dev.cpu.0.coretemp.delta"
extNames.68 = "CPU 2 - TEMP"
extCommand.68 = "/usr/local/bin/cacti_devil_cpu_temp.sh dev.cpu.2.coretemp.delta"
extNames.69 = "CPU 4 - TEMP"
extCommand.69 = "/usr/local/bin/cacti_devil_cpu_temp.sh dev.cpu.4.coretemp.delta"
extNames.70 = "CPU 6 - TEMP"
extCommand.70 = "/usr/local/bin/cacti_devil_cpu_temp.sh dev.cpu.6.coretemp.delta"
extNames.71 = "CPU 8 - TEMP"
extCommand.71 = "/usr/local/bin/cacti_devil_cpu_temp.sh dev.cpu.8.coretemp.delta"
extNames.72 = "CPU 10 - TEMP"
extCommand.72 = "/usr/local/bin/cacti_devil_cpu_temp.sh dev.cpu.10.coretemp.delta"
extNames.73 = "HDD 0 TEMP"
extCommand.73 = "/usr/local/bin/cacti_devil_hd_temp.sh /dev/ada0"
extNames.74 = "HDD 1 TEMP"
extCommand.74 = "/usr/local/bin/cacti_devil_hd_temp.sh /dev/ada1"
extNames.75 = "HDD 2 TEMP"
extCommand.75 = "/usr/local/bin/cacti_devil_hd_temp.sh /dev/ada2"
extNames.76 = "HDD 3 TEMP"
extCommand.76 = "/usr/local/bin/cacti_devil_hd_temp.sh /dev/ada3"
extNames.77 = "HDD 4 TEMP"
extCommand.77 = "/usr/local/bin/cacti_devil_hd_temp.sh /dev/ada4"
/usr/local/bin/cacti_devil_cpu_temp.sh
Code: Select all
#!/bin/sh
# script by DEVIL
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
comma=`/sbin/sysctl -n $1`
t=$((105 - $comma))
echo $t
Code: Select all
#!/bin/sh
# script by DEVIL
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
comma=`smartctl -a $1 | grep 190 | awk '{print $10}'`
echo $comma
- Attachments
-
- Cacti XML-s.zip
- (26.3 KiB) Downloaded 173 times
Re: Templates for FreeBSD
Great! Could I add your work to the next version of FreeBSD template?DEVILro wrote:
Now I'm working on big update (for BSD version > 9)
Let the Cacti grow!
Who is online
Users browsing this forum: No registered users and 0 guests