Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Dec 19, 2018 10:47 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Graph nan after creating Data Input Method
PostPosted: Fri Jun 08, 2018 9:45 am 
Offline

Joined: Tue Jun 08, 2010 9:11 am
Posts: 29
Hello,

I wanted to graph users from a specific application runing on a linux server.

I created a shell script working fin and returning an integer value.

I then created a Data Input Method for the server to graph, next a Data Template and a Graph Template following the http://docs.cacti.net/manual:088:3a_advanced_topics.1_data_input_methods#creating_a_data_input_method article.

I added the graph Template in my device but the graph remains blank with NAN.

I have already done such a graph Template for a Windows server and did not encounter any problem.

How to troubleshoot that problem? I'd like to check each step of the creation but don't know how.

Any help is appreciated.


Top
 Profile  
 
 Post subject: Re: Graph nan after creating Data Input Method
PostPosted: Sat Jun 09, 2018 6:27 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1827
Enable device debug logging for the device in question and then show the logs for the output of that script.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Graph nan after creating Data Input Method
PostPosted: Mon Jun 11, 2018 2:19 am 
Offline

Joined: Tue Jun 08, 2010 9:11 am
Posts: 29
What do you mean by "Enable device debug logging for the device" ?

i don't know how to set it ....

Below is the debug result for the graph:

Quote:
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='VLNXDIAP2 - DIAPASON users counter GT' \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label= \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="/usr/share/cacti/rra/vlnxdiap2_diap_users_counter_506.rrd":DIAP_users_counter:AVERAGE \
AREA:a#4444FFFF:"Diapason Working users" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"

RRDTool Says:
OK


Top
 Profile  
 
 Post subject: Re: Graph nan after creating Data Input Method
PostPosted: Mon Jun 11, 2018 9:50 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1827
Edit the device in question, click on the Enable Device Debug.

You can also do this within Settings, by entering the ID in the Selected Device Debug box.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Graph nan after creating Data Input Method
PostPosted: Mon Jun 11, 2018 10:18 am 
Offline

Joined: Tue Jun 08, 2010 9:11 am
Posts: 29
I must be blind or something like this but nothing related to debug in the settings nor in the edit device.

Do you have a snapshot to enlight me ?


Top
 Profile  
 
 Post subject: Re: Graph nan after creating Data Input Method
PostPosted: Tue Jun 12, 2018 9:35 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1827
Wait a sec, what version are you running on?

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Graph nan after creating Data Input Method
PostPosted: Tue Jun 12, 2018 10:47 am 
Offline

Joined: Tue Jun 08, 2010 9:11 am
Posts: 29
Version 0.8.7h


Top
 Profile  
 
 Post subject: Re: Graph nan after creating Data Input Method
PostPosted: Tue Jun 12, 2018 6:27 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1827
Oh, in that case... I'm not going to be much help. I really only know the 1.x code. I'm not sure if there was a device debug on that version.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Graph nan after creating Data Input Method
PostPosted: Wed Jun 13, 2018 7:26 am 
Offline
Cacti User

Joined: Wed Mar 01, 2017 2:34 pm
Posts: 60
In 0.8.x, you can only globally enable debug logging. You do this in cacti settings. Set the log level to debug. The challenge is to find your devices' logs in the heap of debug messages of all the other devices.


Top
 Profile  
 
 Post subject: Re: Graph nan after creating Data Input Method
PostPosted: Wed Jun 13, 2018 9:34 am 
Offline

Joined: Tue Jun 08, 2010 9:11 am
Posts: 29
I found the origin of the problem: in the cacti log file, I have the folowing messages.


Quote:
/usr/share/cacti/scripts/check_VLNXDIAP_working_users.pl 128.1.110.130, output: Remote command execution failed: Could not create directory '/usr/share/cacti/.ssh'.


Then I created the .ssh directory, but now I have this.

Quote:
/usr/share/cacti/scripts/check_VLNXDIAP_working_users.pl 128.1.110.130, output: Remote command execution failed: Host key verification failed.


I copied the content of the /root/.ssh in /usr/share/cacti/.ssh because my remote server is declared in the known_hosts file and the rsa keys also

What do I have to do more ? It is strange that cacti needs his own .ssh files and directory, why not using the /root/.ssh ?


Top
 Profile  
 
 Post subject: Re: Graph nan after creating Data Input Method
PostPosted: Wed Jun 13, 2018 10:25 am 
Offline

Joined: Tue Jun 08, 2010 9:11 am
Posts: 29
After changing the owner of the file to cacti:apache it works now!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Top
 Profile  
 
 Post subject: Re: Graph nan after creating Data Input Method
PostPosted: Fri Jun 15, 2018 10:34 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1827
Yes, if you copied that from root, only root would have had privilege to the file. The folder and contents of .ssh must be readable only to the user who is the owner (eg, 600 for files and 700 for directories).

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 5 hours


Who is online

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