How to draw graph for remote devices?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

michaelhoang
Posts: 9
Joined: Mon Jun 27, 2016 2:41 am

How to draw graph for remote devices?

Post by michaelhoang »

Hi Everyone,

I am a new user in Cacti.
I'm using Cacti 0.8.8 installed on RHEL 6.5. It is running fine for graph but having some problem while collecting data from Remote server.

When creating graph for remote server, it is drawing exactly the same with the local graph.
From the devices, I have used the Host template is "None" as suggested by the Documentation when we are not sure about the type we should use.

However, it is collecting and drawing the graph using local data hence it is exactly the same as the local graph is.
Can you let me know which I should configure to draw the graph for remote server?
Any suggestion or recommendation is highly appreciate :)

Thank you for your time for my question.
Regards,
Michael
cigamit
Developer
Posts: 3368
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: How to draw graph for remote devices?

Post by cigamit »

What did you put as the "hostname" for the remote host? Did you put its IP / hostname, or did you put localhost?
michaelhoang
Posts: 9
Joined: Mon Jun 27, 2016 2:41 am

Re: How to draw graph for remote devices?

Post by michaelhoang »

Hi Cigamit,
Thank you for your suggestion.

Yah of course...I used IP Address for the host.
It's ping and SNMP checking successfully.

Do I need to configure on the remote server in this situation?
Any other advises are welcome :)

Thanks and best regards,
Michael
Last edited by michaelhoang on Mon Jun 27, 2016 11:47 pm, edited 1 time in total.
cigamit
Developer
Posts: 3368
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: How to draw graph for remote devices?

Post by cigamit »

You will need SNMP configured on the remote host, and you will want to make sure you are using the Host MIB graphs and the Data Queries such as 'SNMP - Interface Statistics', instead of the ones for the localhost.

If you scroll down and show a picture of what graph templates / data queries you have assigned to the device, I can help steer you in the right direction.
michaelhoang
Posts: 9
Joined: Mon Jun 27, 2016 2:41 am

Re: How to draw graph for remote devices?

Post by michaelhoang »

cigamit wrote:You will need SNMP configured on the remote host, and you will want to make sure you are using the Host MIB graphs and the Data Queries such as 'SNMP - Interface Statistics', instead of the ones for the localhost.

If you scroll down and show a picture of what graph templates / data queries you have assigned to the device, I can help steer you in the right direction.
Thanks cigamit very much for your help.

I have configured the snmp on remote host but not sure if I'm in correct way.
Using snmpwalk -v 1 -c public tcp:localhost:161 command on remote host, i can see the output of the MIBs.

However, it is still drawing the local graph instead of remote server graph.
Please find the screenshot of the device detail below.
Please let me know what I need to do to achieve the remote server data graph.

Thanks and best regards,
Michael
Attachments
more detail.JPG
more detail.JPG (157.47 KiB) Viewed 2107 times
cigamit
Developer
Posts: 3368
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: How to draw graph for remote devices?

Post by cigamit »

Ya, you are using the graphs that are only meant to be used with the local server. Under "Associated Graph Templates", click that drop down and add the ones that start with "Host Mib". Then under the 'Associated Data Queries', select the ones that begin with 'SNMP - '. Then at the top, click the link to 'Create Graphs' and select the graphs you just specified. As another step, you will want to click on 'Data Sources' on the left in the console, and delete the data sources that belong to those other graphs for that host. Be sure to tell it to clean up the associated graphs also when it prompts you.
michaelhoang
Posts: 9
Joined: Mon Jun 27, 2016 2:41 am

Re: How to draw graph for remote devices?

Post by michaelhoang »

cigamit wrote:Ya, you are using the graphs that are only meant to be used with the local server. Under "Associated Graph Templates", click that drop down and add the ones that start with "Host Mib". Then under the 'Associated Data Queries', select the ones that begin with 'SNMP - '. Then at the top, click the link to 'Create Graphs' and select the graphs you just specified. As another step, you will want to click on 'Data Sources' on the left in the console, and delete the data sources that belong to those other graphs for that host. Be sure to tell it to clean up the associated graphs also when it prompts you.
Oh I got it :) Remote server will need to use Host mib and SNMP Data query...
I have made the change (delete then re-add the device actually :p) but there is no resource detecting...
Verbose query for "SNMP - Get Mounted Partition" is giving the output as the following:

+ Running data query [8].
+ Found type = '6' [Script Query - Script Server].
+ Found data query XML file at '/usr/share/cacti/resource/script_server/host_disk.xml'
+ XML file parsed ok.
+ Executing script for num of indexes '"/usr/bin/php" -q /usr/share/cacti/scripts/ss_host_disk.php 10.12.15.94 9 1:161:500:1:10:public:::::: num_indexes'
+ Found number of indexes: 0
+ Executing script for list of indexes '"/usr/bin/php" -q /usr/share/cacti/scripts/ss_host_disk.php 10.12.15.94 9 1:161:500:1:10:public:::::: index' Index Count: 0
+ Executing script query '"/usr/bin/php" -q /usr/share/cacti/scripts/ss_host_disk.php 10.12.15.94 9 1:161:500:1:10:public:::::: query index'
+ Executing script query '"/usr/bin/php" -q /usr/share/cacti/scripts/ss_host_disk.php 10.12.15.94 9 1:161:500:1:10:public:::::: query description'
+ Executing script query '"/usr/bin/php" -q /usr/share/cacti/scripts/ss_host_disk.php 10.12.15.94 9 1:161:500:1:10:public:::::: query sau'

Does that mean SNMP is not configured on remote server?
Thank you for your help in advance :)
Last edited by michaelhoang on Tue Jun 28, 2016 3:57 am, edited 1 time in total.
cigamit
Developer
Posts: 3368
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: How to draw graph for remote devices?

Post by cigamit »

What type of device is it? Does it already have SNMP configured and listening?
michaelhoang
Posts: 9
Joined: Mon Jun 27, 2016 2:41 am

Re: How to draw graph for remote devices?

Post by michaelhoang »

cigamit wrote:What type of device is it? Does it already have SNMP configured and listening?
that is another RHEL 6.5 server.
net-snmp has been installed, configured and running on that server :)

From cacti server, i can use the simple snmpwalk query to retrieve the data on that remote side:
[root@### rra]# snmpwalk -v 2c -c public #### .1.3.6.1.2.1.1.1.0
SNMPv2-MIB::sysDescr.0 = STRING: Linux ######### ....
Last edited by michaelhoang on Mon Jun 27, 2016 11:09 pm, edited 1 time in total.
cigamit
Developer
Posts: 3368
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: How to draw graph for remote devices?

Post by cigamit »

Also, try changing the SNMP version to 2 and see if that helps.
michaelhoang
Posts: 9
Joined: Mon Jun 27, 2016 2:41 am

Re: How to draw graph for remote devices?

Post by michaelhoang »

cigamit wrote:Also, try changing the SNMP version to 2 and see if that helps.
Oh yah :D Finally, mounted partition are returned to success.
However, it cannot discover anything on the server :(

I saw the following error while creating graph for Mounted Partition:
No more variables left in this MIB View (It is past the end of the MIB tree)

Also, graph is not drawing for the other as screenshot attached.
Can you suggest how I can proceed on this?

Thank you for your time and your help in advance :)
Regards,
Michael
Last edited by michaelhoang on Tue Jun 28, 2016 3:57 am, edited 1 time in total.
cigamit
Developer
Posts: 3368
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: How to draw graph for remote devices?

Post by cigamit »

You can try to edit /etc/snmp/snmpd.conf and change the 'view all' line to

Code: Select all

view all        included  .1                                      80
then restart snmpd, and requery the data query.
michaelhoang
Posts: 9
Joined: Mon Jun 27, 2016 2:41 am

Re: How to draw graph for remote devices?

Post by michaelhoang »

cigamit wrote:You can try to edit /etc/snmp/snmpd.conf and change the 'view all' line to

Code: Select all

view all        included  .1                                      80
then restart snmpd, and requery the data query.
I have made the change, restart snmpd then requery the data.
However, the data is not shown up :(
I still face the error:
No more variables left in this MIB View (It is past the end of the MIB tree)

Regards,
Michael
Attachments
graph.JPG
graph.JPG (25.62 KiB) Viewed 2102 times
cigamit
Developer
Posts: 3368
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: How to draw graph for remote devices?

Post by cigamit »

Can you post that portion of your snmpd.conf ? Kinda curious what it shows in there vs what I have in Centos.
michaelhoang
Posts: 9
Joined: Mon Jun 27, 2016 2:41 am

Re: How to draw graph for remote devices?

Post by michaelhoang »

cigamit wrote:Can you post that portion of your snmpd.conf ? Kinda curious what it shows in there vs what I have in Centos.
Yah please find the snmpd.conf as attached.
Attachments
snmpd.txt
(18.44 KiB) Downloaded 150 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest