Warning: session_start(): open(/tmp/sess_b94a8717fcfba0b76f14b0072bbb55e1, O_RDWR) failed: No space left on device (28) in /var/www/html/inc/init.php on line 265

Warning: session_start(): Failed to read session data: files (path: ) in /var/www/html/inc/init.php on line 265

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/inc/init.php:265) in /var/www/html/inc/auth.php on line 432

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/inc/init.php:265) in /var/www/html/inc/actions.php on line 38
ntp_pzf_splunk [Ben's notes]

Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


ntp_pzf_splunk

Splunk - retrieve NTP PZF stats script

  • Create script and use as input for splunk:
    #!/bin/bash
    
    #this script needs the moreutils package
    
    ntpserver="ntp1.domain.tld"
    community="<your community string>"
    version="2c"
    
    /bin/snmpget -OsQ -v $version -c $community $ntpserver \
    	mbgLtNgRefclockStatusA.1 \
    	mbgLtNgRefclockStatusB.1 \
    	| tr -d " " | ts
  • Example output:
    $ ./get-pzf-stats.sh
    Jan 07 23:45:59 mbgLtNgRefclockStatusA.1=96
    Jan 07 23:45:59 mbgLtNgRefclockStatusB.1=99
ntp_pzf_splunk.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1