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

    Force pfsense Telegram notification via Shell Command

    Scheduled Pinned Locked Moved webGUI
    3 Posts 2 Posters 222 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.
    • C
      CloudNode
      last edited by

      Is there a way to Force pfsense Telegram notification via Shell Command. As a test for example
      echo "test" | telegram notification?

      I currently have mail and telegram setup under pfsense notifications and they work for system info/errors

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

        @CloudNode

        Take a look, at the manual (your own pfSense) : /etc/inc/notices.inc : the last 5 or 6 lines.
        Or the source, here.

        So, make a file, call it 'testfile.php' that contains this :

        <?php
        
          require_once("notices.inc");
          require_once("util.inc");
        
          $msg='Hi !';
          notify_all_remote($msg);
        
        ?>
        

        and then : show time :

        php -q testfile.php
        

        and check your Telegram account ^^

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

        C 1 Reply Last reply Reply Quote 1
        • C
          CloudNode @Gertjan
          last edited by

          @Gertjan thank you!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.