Assume that, If you have installed MRTG  for monitoring network device(switch) on Linux system, also you would like to monitoring MRTG on Nagios just following below steps,

Its Nagios shows monitoring network status from MRTG ports log,

How to Configure:

Login into your Nagios Server,create a new file mrtgmonitor.cfg for configure mrtg host. File creation location already discussed on nagios server installation post.

​# cd /usr/local/nagios/etc/servers

# touch mrtgmonitor.cfg

Note : /var/www/html/mrtg/mrtg- and /var/www/html/mrtg/ this is mrtg log files.

Add below lines

define host{
        use                     MRTG-SERVER
        alias                   host.mrtg-server

define service{
        use                             generic-service
        service_description             PORT-1

define service{
        use                             generic-service
        service_description             PORT-2

Save the file :wq!

then go to /usr/local/nagios/etc/objects/ path and open the command.cfg file.
# cd /usr/local/nagios/etc/objects

# vim command.cfg

#command definition #
define command{
command_line $USER1$/ -L $ARG1$ -F $ARG2$ -w $ARG3$ -c $ARG4$ -u $ARG5$

Finally in Nagios server side configuration completed, then test the configuration and restart it.
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

# /etc/init.d/nagios restart

Running configuration check...
Stopping nagios:. done.
Starting nagios: done.

Client side configure (MRTG Installed Server):

Download the file from Nagios   and move the script to /usr/loca/nagios/libexec directory 

Before add the command in nrpe.cfg file check on your terminal whether working on or not?
#  /usr/local/nagios/libexec/ -FUNCT AVG -LOG /var/www/html/mrtg/yourmrtg_port_log.log -WARN 10,10 -CRIT 15,15 -u megabytes
 Traffic OK: AVG. in = 4.32478332519531 Mbyte/s, AVG. out = 1.71255493164062 Mbyte/s. 

Now you will update in nrpe.cfg file
# cd /usr/local/nagios/etc/

# vim nrpe.cfg

command[check_switch]= /usr/local/nagios/libexec/ -FUNCT AVG -LOG /var/www/html/mrtg/yourmrtg_port_log.log -WARN 10,10 -CRIT 15,15 -u megabytes

Now, save that file :wq!