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

    Get list of interface name, descriptions and ip address

    Development
    2
    4
    321
    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

      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
      • GertjanG
        Gertjan
        last edited by

        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

          Thanks, I can work with this.

          1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan
            last edited by

            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
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.