• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Get list of interface name, descriptions and ip address

Scheduled Pinned Locked Moved Development
4 Posts 2 Posters 329 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    trumee
    last edited by Apr 3, 2020, 2:59 AM

    Hello,

    I want get a list of interface names, descriptions and their ip addresses via cli to feed into zabbix/influxdb. I can see this information being listed in 'console' login. Is it possible to get this via a script?

    Thanks

    1 Reply Last reply Reply Quote 0
    • G
      Gertjan
      last edited by Apr 3, 2020, 6:23 AM

      Hi,

      Have a close look at that information.

      see this :

      8d84175a-ba40-4d56-9c13-39b04c3813b0-image.png

      That's a perfect candidate for what looks like a static text : it's hardcoded somewhere in a script that make the login screen menu.

      Knowing that your question is as old as there are console type system access, some oen wrote a tools for it in the sixties, some 60 years ago.
      It's called 'grep'.

      In the console, use option 8.
      Type

      grep -R '*** Welcome to' /etc/*
      

      I guess you underand why I choose as a string to be searched for.
      Check out the file it found : /etc/rc.banner
      That's a small file that collects all the info. You can see how it's done using world most simplest script language : PHP.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      1 Reply Last reply Reply Quote 1
      • T
        trumee
        last edited by Apr 3, 2020, 11:27 AM

        Thanks, I can work with this.

        1 Reply Last reply Reply Quote 0
        • G
          Gertjan
          last edited by Apr 3, 2020, 12:11 PM

          Of course ☺

          You already did. When you visit the console, you activated that script.
          ( maybe without knowing it )

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          1 Reply Last reply Reply Quote 0
          4 out of 4
          • First post
            4/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received