Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Jun 25, 2017 2:11 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Templates for FreeBSD
PostPosted: Mon Feb 25, 2013 8:16 am 
Offline
User avatar

Joined: Fri Feb 22, 2013 8:31 am
Posts: 1
Location: Orel, Russia
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 254 times
Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Thu Apr 04, 2013 9:01 am 
Offline
Cacti User

Joined: Tue Mar 18, 2008 2:30 am
Posts: 91
Location: Czech
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.


Thank you,
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
...

_________________
Author of:
FreeBSD template
ESXi template
Intropage plugin
Multicore CPU average graph
HP MSM wifi controller 7xx
TopX plugin


Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Thu Aug 15, 2013 12:09 pm 
Offline
Cacti User

Joined: Tue Mar 18, 2008 2:30 am
Posts: 91
Location: Czech
Version 2 examples :-)


Attachments:
File comment: Spam stats
mail_stats.png
mail_stats.png [ 39.86 KiB | Viewed 3173 times ]
File comment: TCP connections
tcp_connection.png
tcp_connection.png [ 45.15 KiB | Viewed 3173 times ]
File comment: Mail stats
mailstats_count.png
mailstats_count.png [ 60.92 KiB | Viewed 3173 times ]

_________________
Author of:
FreeBSD template
ESXi template
Intropage plugin
Multicore CPU average graph
HP MSM wifi controller 7xx
TopX plugin
Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Wed Feb 26, 2014 2:20 pm 
Offline
Cacti User

Joined: Tue Mar 18, 2008 2:30 am
Posts: 91
Location: Czech
uoops!
I forget add snmp v3 support. I will fix it asap

_________________
Author of:
FreeBSD template
ESXi template
Intropage plugin
Multicore CPU average graph
HP MSM wifi controller 7xx
TopX plugin


Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Wed Jul 09, 2014 4:03 pm 
Offline

Joined: Fri Jun 27, 2014 7:19 am
Posts: 47
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...


Attachments:
PfSense.txt [221.14 KiB]
Downloaded 153 times
Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Wed Jul 23, 2014 7:43 am 
Offline
Cacti User

Joined: Tue Mar 18, 2008 2:30 am
Posts: 91
Location: Czech
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...


Hi,
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

_________________
Author of:
FreeBSD template
ESXi template
Intropage plugin
Multicore CPU average graph
HP MSM wifi controller 7xx
TopX plugin


Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Wed Jul 23, 2014 7:54 am 
Offline

Joined: Fri Jun 27, 2014 7:19 am
Posts: 47
macan wrote:
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...


Hi,
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


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.


Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Wed Jul 23, 2014 8:05 am 
Offline
Cacti User

Joined: Tue Mar 18, 2008 2:30 am
Posts: 91
Location: Czech
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.

[/quote]

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

_________________
Author of:
FreeBSD template
ESXi template
Intropage plugin
Multicore CPU average graph
HP MSM wifi controller 7xx
TopX plugin


Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Wed Jan 07, 2015 8:37 am 
Offline

Joined: Wed Jan 07, 2015 7:49 am
Posts: 1
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

Code:
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


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.


Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Mon Feb 09, 2015 2:47 am 
Offline
Cacti User

Joined: Tue Mar 18, 2008 2:30 am
Posts: 91
Location: Czech
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

Code:
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


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.


Hi,
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

_________________
Author of:
FreeBSD template
ESXi template
Intropage plugin
Multicore CPU average graph
HP MSM wifi controller 7xx
TopX plugin


Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Fri May 08, 2015 8:11 pm 
Offline

Joined: Mon Apr 13, 2015 5:53 pm
Posts: 43
Anybody happen to know if this works without tweaking with net-snmp also? I prefer the net-snmp port over the native bsdnsmp implementation.


Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Sun Jun 21, 2015 6:11 am 
Offline

Joined: Sun Jun 21, 2015 5:32 am
Posts: 1
Regarding the issue "Result from SNMP not valid. Partial Result: U":
Quote:
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.


Had similar issue with a fresh install of cacti 0.8.8 on FreeBSD 10.1 as well.
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. :D


Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Sun Jun 21, 2015 8:51 pm 
Offline

Joined: Mon Apr 13, 2015 5:53 pm
Posts: 43
Not to be a smart ass but that "tricky change" was noted in both /usr/ports/UPDATING and /usr/src/UPDATING

Quote:
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.



Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Sat Feb 25, 2017 5:50 pm 
Offline

Joined: Thu Feb 23, 2017 5:07 pm
Posts: 2
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
Code:
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"

Script
/usr/local/bin/cacti_devil_cpu_temp.sh

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


/usr/local/bin/cacti_devil_hd_temp.sh

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

i allso attached my xml-s

Attachment:
Graph.jpg
Graph.jpg [ 157.65 KiB | Viewed 590 times ]


Attachments:
Cacti XML-s.zip [26.3 KiB]
Downloaded 26 times
Top
 Profile  
 
 Post subject: Re: Templates for FreeBSD
PostPosted: Mon Feb 27, 2017 4:23 am 
Offline
Cacti User

Joined: Tue Mar 18, 2008 2:30 am
Posts: 91
Location: Czech
DEVILro wrote:
Attachment:
Graph.jpg


Great! Could I add your work to the next version of FreeBSD template?
Now I'm working on big update (for BSD version > 9)

_________________
Author of:
FreeBSD template
ESXi template
Intropage plugin
Multicore CPU average graph
HP MSM wifi controller 7xx
TopX plugin


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 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