Creating Templates ... how exactly?
Moderators: Developers, Moderators
Creating Templates ... how exactly?
I am new to Cacti, and have things up and running. Now I am starting to look at creating templates for graphs and data.
The data that I want to retrieve is all SNMP data of devices. I have used the generic SNMP-OID graph template, and that has worked out.
However, I am now starting to look at doing SNMP queries on two pieces of data, taking the result, dividing by each other to get a percentage.
I guess I should start out small, and work from there.
I want to be able to get the data from wireless access points to reflect the current number of associated clients. I have the OID that I want to use, and I would much rather use a template for that data. Once I have the data, I want to create a graph of that.
How would I go about running the SNMP query of the OID, storing that, then creating a graph template of that data?
I did look at the guide gandalf put together, but the example there deals with scripts, I just want to use the NET-SMTP agent to run the query.
Any help would be appreciated
The data that I want to retrieve is all SNMP data of devices. I have used the generic SNMP-OID graph template, and that has worked out.
However, I am now starting to look at doing SNMP queries on two pieces of data, taking the result, dividing by each other to get a percentage.
I guess I should start out small, and work from there.
I want to be able to get the data from wireless access points to reflect the current number of associated clients. I have the OID that I want to use, and I would much rather use a template for that data. Once I have the data, I want to create a graph of that.
How would I go about running the SNMP query of the OID, storing that, then creating a graph template of that data?
I did look at the guide gandalf put together, but the example there deals with scripts, I just want to use the NET-SMTP agent to run the query.
Any help would be appreciated
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Creating Templates ... how exactly?
Where exactly did you look? Already tried Loads of cacti HowTos? If you need more, please let me knowrsaeks wrote:I did look at the guide gandalf put together, but the example there deals with scripts, I just want to use the NET-SMTP agent to run the query.
Any help would be appreciated
Reinhard
I went through the guide on using SNMP to query data and then make the graph. Here is what I did:
Named Data Template: Apple - Airport - Associated Clients
Unchecked checkbox on Name field in Data Source entry
Changed Data Source Name to: |host_description| - Associated Clients
Data Source Item Internal name called: assocaitedClients
Max value changed to 0
Data Source Type: Counter
In Custom Data, OID was entered.
Created a Graph Template: Airport - Associated Clients
Title: |host_description| - Associated Clients
Added Graph Template Items: Apple - Airport Associated Clients (associatedClients)
Text Format: Associated Clients
I also created a graph from the Generic OID template with the same OID. When I show the host graph in the Generic OID, I am showing data, and when I go to the template, I show 0 all the time, even though there is data present.
I hope that helps give you an idea of my setup.
Thanks.
Named Data Template: Apple - Airport - Associated Clients
Unchecked checkbox on Name field in Data Source entry
Changed Data Source Name to: |host_description| - Associated Clients
Data Source Item Internal name called: assocaitedClients
Max value changed to 0
Data Source Type: Counter
In Custom Data, OID was entered.
Created a Graph Template: Airport - Associated Clients
Title: |host_description| - Associated Clients
Added Graph Template Items: Apple - Airport Associated Clients (associatedClients)
Text Format: Associated Clients
I also created a graph from the Generic OID template with the same OID. When I show the host graph in the Generic OID, I am showing data, and when I go to the template, I show 0 all the time, even though there is data present.
I hope that helps give you an idea of my setup.
Thanks.
I want to make a template to graph OID: .1.3.6.1.4.63.501.3.2.1.0
I went though your SNMP directions (http://docs.cacti.net/node/70)
I put in the OID and made the template. I guess I would want to know how to make a graph from that Data template. I went though what your posted, and just get a graph that is blank, with no errors in graph debug mode. When I use the built-in generic OID templateand plug in the SNMP communitity and OID, I get data on the graph.
I could give you screen shots, but I don't really know what you would want / find helpful.
Screens of the data template? Graph Template? Host template?
One step at a time is my thought, but I am not sure what to give you to help.
Let me know and I'l jump through the hoops to learn
I went though your SNMP directions (http://docs.cacti.net/node/70)
I put in the OID and made the template. I guess I would want to know how to make a graph from that Data template. I went though what your posted, and just get a graph that is blank, with no errors in graph debug mode. When I use the built-in generic OID templateand plug in the SNMP communitity and OID, I get data on the graph.
I could give you screen shots, but I don't really know what you would want / find helpful.
Screens of the data template? Graph Template? Host template?
One step at a time is my thought, but I am not sure what to give you to help.
Let me know and I'l jump through the hoops to learn
Well, that sucks .... I posted but apparently the message didn't go through.
I started by duplicating the SNMP - Generic OID Template
I then went and called it Airport - Associated Clients.
In the Data Source, I unchecked the check box for Use Per-Data source.
I then went and called it |host_description| - associated Clients
In the Data Source Item field, I named the Internal Data Source Name associatedClients
I then set the Max Value to 0, and set it to a Gauge.
Finally, I went ad set the OID to .1.3.6.1.4.63.501.3.2.1.0
At that point, I added the host, set the IP and SNMP string.
Does that part seem correct? Is there a way to associate this Data Template with a host to start collecting data?
I started by duplicating the SNMP - Generic OID Template
I then went and called it Airport - Associated Clients.
In the Data Source, I unchecked the check box for Use Per-Data source.
I then went and called it |host_description| - associated Clients
In the Data Source Item field, I named the Internal Data Source Name associatedClients
I then set the Max Value to 0, and set it to a Gauge.
Finally, I went ad set the OID to .1.3.6.1.4.63.501.3.2.1.0
At that point, I added the host, set the IP and SNMP string.
Does that part seem correct? Is there a way to associate this Data Template with a host to start collecting data?
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Fine, now you should create a Graph template for this data templatersaeks wrote:Well, that sucks .... I posted but apparently the message didn't go through.
I started by duplicating the SNMP - Generic OID Template
I then went and called it Airport - Associated Clients.
In the Data Source, I unchecked the check box for Use Per-Data source.
I then went and called it |host_description| - associated Clients
In the Data Source Item field, I named the Internal Data Source Name associatedClients
I then set the Max Value to 0, and set it to a Gauge.
Finally, I went ad set the OID to .1.3.6.1.4.63.501.3.2.1.0
You should add the Graph template to the appropriate section of that host and then "Create Graphs for this Host"At that point, I added the host, set the IP and SNMP string.
Does that part seem correct? Is there a way to associate this Data Template with a host to start collecting data?
Reinhard
I created a graph template by adding the graph template item of the data source "Airport - Associated Clients - (associatedClients) I set it to an area graph, and the Text Format was associatedClients.
When I go back to the graph template, I see that I have a Graph Template Item of (assocatedClients): assoicated Clients and a Graph Item input of Data Source [associatedClients]
I wait a few min, but still appears on the graph. I run an snmpget with the community and OID manually, and get data back.
If I look at my Data Sources and turn on debug mode, I see this:
/opt/local/bin/rrdtool create \
/Library/WebServer/Documents/cacti/rra/ma_ap_106_associatedclients_71.rrd \
--step 300 \
DS:associatedClients:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \
The SNMP verson on the host is set to the same as I am putting in when I run snmpget.
Any other ideas? I could give you the info and create a username / password for you if that would help any.
When I go back to the graph template, I see that I have a Graph Template Item of (assocatedClients): assoicated Clients and a Graph Item input of Data Source [associatedClients]
I wait a few min, but still appears on the graph. I run an snmpget with the community and OID manually, and get data back.
If I look at my Data Sources and turn on debug mode, I see this:
/opt/local/bin/rrdtool create \
/Library/WebServer/Documents/cacti/rra/ma_ap_106_associatedclients_71.rrd \
--step 300 \
DS:associatedClients:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \
The SNMP verson on the host is set to the same as I am putting in when I run snmpget.
Any other ideas? I could give you the info and create a username / password for you if that would help any.
Who is online
Users browsing this forum: No registered users and 4 guests