how to do this graphing in nagios
how to do this graphing in nagios
Hello Gents,
as long as my work with nagios core continues my linux experience is improving "Thanks Nagios", and of course much more requirements pops up.
we have the devices of mikrotik, ubnt, and cisco in the network and of course linux servers for radius and nagios which all needed to be monitored. now, after installing nagios, i want to monitor the network in terms of SNMP parameters graphing it and record this data for 30 days.
SNMP parameters are (PING, Traffic, CPU load, up-time) and the bandwidth of the internet.
how to start and where to begin, if any problems faced, it'll be posted here, to make knowledge available for all.
as long as my work with nagios core continues my linux experience is improving "Thanks Nagios", and of course much more requirements pops up.
we have the devices of mikrotik, ubnt, and cisco in the network and of course linux servers for radius and nagios which all needed to be monitored. now, after installing nagios, i want to monitor the network in terms of SNMP parameters graphing it and record this data for 30 days.
SNMP parameters are (PING, Traffic, CPU load, up-time) and the bandwidth of the internet.
how to start and where to begin, if any problems faced, it'll be posted here, to make knowledge available for all.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: how to do this graphing in nagios
Install PNP4Nagios
https://sites.google.com/a/box293.com/n ... core-4-0-x
Let us know how this goes for you.
https://sites.google.com/a/box293.com/n ... core-4-0-x
Let us know how this goes for you.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: how to do this graphing in nagios
Box293 wrote:Install PNP4Nagios
https://sites.google.com/a/box293.com/n ... core-4-0-x
Let us know how this goes for you.
thanks for the link, but is the only graphing tool for nagios?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: how to do this graphing in nagios
There are other tools available, PNP4Nagios is the only one I've played with.
https://exchange.nagios.org/directory/A ... d-Trending
https://exchange.nagios.org/directory/A ... d-Trending
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: how to do this graphing in nagios
what about MRTG, is it integratable to the Nagios?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: how to do this graphing in nagios
It certainly is.
Honestly I use Nagios XI which includes MRTG so I've never had to set it up from scratch, however I'm sure if you follow the documentation you'll get it working.
Honestly I use Nagios XI which includes MRTG so I've never had to set it up from scratch, however I'm sure if you follow the documentation you'll get it working.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: how to do this graphing in nagios
which documentation, describe the integration between nagios and MRTGBox293 wrote:It certainly is.
Honestly I use Nagios XI which includes MRTG so I've never had to set it up from scratch, however I'm sure if you follow the documentation you'll get it working.
Re: how to do this graphing in nagios
I couldn't find much instruction on MRTG / Nagios, but I will direct you to our exchange which has a Graphing addons available.
https://exchange.nagios.org/directory/A ... d-Trending
https://exchange.nagios.org/directory/A ... d-Trending
Former Nagios Employee
Re: how to do this graphing in nagios
while the installation the last part about editing the command.cfg and the nagios.cfgBox293 wrote:Install PNP4Nagios
https://sites.google.com/a/box293.com/n ... core-4-0-x
Let us know how this goes for you.
for the nagios.cfg
command to be executed from the website is :-
Code: Select all
Type sed -i 's/^#host_perfdata_file_template=.*/host_perfdata_file_template=DATATYPE::HOSTPERFDATA\\tTIMET::$TIMET$\\tHOSTNAME::$HOSTNAME$\\tHOSTPERFDATA::$HOSTPERFDATA$\\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\\tHOSTSTATE::$HOSTSTATE$\\tHOSTSTATETYPE::$HOSTSTATETYPE$/g' /usr/local/nagios/etc/nagios.cfg and press Enter
Type sed -i 's/^#service_perfdata_file_template=.*/service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\\tTIMET::$TIMET$\\tHOSTNAME::$HOSTNAME$\\tSERVICEDESC::$SERVICEDESC$\\tSERVICEPERFDATA::$SERVICEPERFDATA$\\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\\tHOSTSTATE::$HOSTSTATE$\\tHOSTSTATETYPE::$HOSTSTATETYPE$\\tSERVICESTATE::$SERVICESTATE$\\tSERVICESTATETYPE::$SERVICESTATETYPE$/g' /usr/local/nagios/etc/nagios.cfg and press Enter
command in the original file is
Code: Select all
#host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$
#service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$
Re: how to do this graphing in nagios
great thanks for BOX293, only something related to configurationBox293 wrote:Install PNP4Nagios
https://sites.google.com/a/box293.com/n ... core-4-0-x
Let us know how this goes for you.
##
we want to monitor and graph the PING, || Port1, Port2, Port3,.... etc || and the most important the bandwidth of Port1 in each device.
the configuration is done according to the 3 file strtgy, i.e. file1= routerhostgroups.cfg, file2= routerservicegroup.cfg, file3= xx_routername.cfg
below is the configuration of :
:::: File1
Code: Select all
define hostgroup{
hostgroup_name Local_Routers ; The name of the hostgroup
# alias Local Routers ; Long name of the group
}
Code: Select all
# Create a service to PING to router
define service{
use generic-service ; Inherit values from a template
hostgroup_name Local_Routers ; The name of the hostgroup the service is associated with
service_description PING ; The service description
check_command check_ping!200.0,20%!600.0,60% ; The command used to monitor the service
normal_check_interval 5 ; Check the service every 5 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined
}
# Monitor uptime via SNMP
define service{
use generic-service ; Inherit values from a template
hostgroup_name Local_Routers ; The name of the hostgroup the service is associated with
service_description Uptime
check_command check_snmp!-C public -o sysUpTime.0
}
# Monitor Port 1 status via SNMP
define service{
use generic-service ; Inherit values from a template
hostgroup_name Local_Routers ; The name of the hostgroup the service is associated with
service_description Port 1 Link Status
check_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
}
# Monitor bandwidth via MRTG logs
define service{
use generic-service ; Inherit values from a template
hostgroup_name Local_Routers ; The name of the hostgroup the service is associated with
service_description Port 1 Bandwidth Usage
check_command check_local_mrtgtraf!/var/lib/mrtg/192.168.1.20_1.log!AVG!1000000,1000000!5000000,5000000!10
}
# 192.168.1.20 is the router Port1 IP
Code: Select all
# 001.MySite1
define host{
use generic-router ; Inherit default values from a template
host_name 001.MySite1 ; The name we're giving to this Router
# alias 001.MySite1 ; A longer name associated with the Router
address 192.168.1.20 ; IP address of the Router
hostgroups Local_Routers, 03-Al-Mahari ; Host groups this Router is associated with
when getting in the nagiosserver/nagios/pnp/index.php the only graphed is the "001.MySite1" Host & Ping.
want to graph the:-
1- per single host => PING, Port1 status, uptime & Traffic bandwidth for Port1
2. sum of (Traffic bandwidth of port1 of all devices) . this to know the overall traffic consumed