What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

remove PAESSHSTART and PAESSHEND from history

Votes:

0

since upgrading to PRTG version 9, SSH sensors leave behind a line in server's bash history file:

echo PAESSHSTART;df -TP;echo PAESSHEND

since sensor is checked every 1-5 minutes, this fills the server's history with these lines:

  967  echo PAESSHSTART;df -TP;echo PAESSHEND
  968  echo PAESSHSTART;df -TP;echo PAESSHEND
  969  echo PAESSHSTART;df -TP;echo PAESSHEND
  970  echo PAESSHSTART;df -TP;echo PAESSHEND
  971  echo PAESSHSTART;df -TP;echo PAESSHEND
  972  echo PAESSHSTART;df -TP;echo PAESSHEND
  973  echo PAESSHSTART;df -TP;echo PAESSHEND
  974  echo PAESSHSTART;df -TP;echo PAESSHEND
  975  echo PAESSHSTART;df -TP;echo PAESSHEND
  976  echo PAESSHSTART;df -TP;echo PAESSHEND
  977  echo PAESSHSTART;df -TP;echo PAESSHEND
  978  echo PAESSHSTART;df -TP;echo PAESSHEND
  979  echo PAESSHSTART;df -TP;echo PAESSHEND
  980  echo PAESSHSTART;df -TP;echo PAESSHEND
  981  echo PAESSHSTART;df -TP;echo PAESSHEND
  982  echo PAESSHSTART;df -TP;echo PAESSHEND
  983  echo PAESSHSTART;df -TP;echo PAESSHEND
  984  echo PAESSHSTART;df -TP;echo PAESSHEND
  985  echo PAESSHSTART;df -TP;echo PAESSHEND
  986  echo PAESSHSTART;df -TP;echo PAESSHEND
  987  echo PAESSHSTART;df -TP;echo PAESSHEND
  988  echo PAESSHSTART;df -TP;echo PAESSHEND
  989  echo PAESSHSTART;df -TP;echo PAESSHEND
  990  echo PAESSHSTART;df -TP;echo PAESSHEND
  991  echo PAESSHSTART;df -TP;echo PAESSHEND
  992  echo PAESSHSTART;df -TP;echo PAESSHEND
  993  echo PAESSHSTART;df -TP;echo PAESSHEND
  994  echo PAESSHSTART;df -TP;echo PAESSHEND
  995  echo PAESSHSTART;df -TP;echo PAESSHEND
  996  echo PAESSHSTART;df -TP;echo PAESSHEND
  997  echo PAESSHSTART;df -TP;echo PAESSHEND
  998  echo PAESSHSTART;df -TP;echo PAESSHEND
  999  echo PAESSHSTART;df -TP;echo PAESSHEND
 1000  echo PAESSHSTART;df -TP;echo PAESSHEND
 1001  history

this renders bash history unusable and is not accepted as normal program behavior. is there a way of preventing these lines from being added?

Amir.

diskspace prtg ssh wishlist

Created on Mar 27, 2012 2:03:27 PM

Last change on Mar 27, 2012 2:54:49 PM by  Daniel Zobel [Product Manager]



4 Replies

Accepted Answer

Votes:

0

Dear Amir,

an "unset HISTFILE;" switch is already on the wish list for SSH sensor types, but it is unlikely that we will implement this soon. Unfortunately we cannot give you an ETA.

Meanwhile we recommend you use a dedicated user account on the target machine to query monitoring data with PRTG, so the histories of your other users are not affected.

Sorry for any inconvenience that may cause on your side!

Created on Mar 27, 2012 2:54:02 PM by  Daniel Zobel [Product Manager]



Votes:

1

as a workaround, the following line can be added to the .bashrc file of the user:

export HISTIGNORE="echo PAESSHSTART;df -TP;echo PAESSHEND:ls -ltr:"

Amir.

Created on May 14, 2012 7:59:36 AM

Last change on May 14, 2012 9:18:03 AM by  Daniel Zobel [Product Manager]



Votes:

0

To complete the proposed workaround (which worked for me with centos/bash) :

  1. first, just let PRTG flood the user's bash history with PAESSHSTART...PAESSHEND entries
  2. then, run in the user's command line the following:
##Back up the .bashrc file ;-) 
cp $HOME/.bashrc $HOME/.bashrc.`date '+%Y%m%d'`;
##add HISTIGNORE to the .bashrc file with this single line command (run it only ONE time): 
grep "PAESS" $HOME/.bash_history | sort | uniq > /tmp/histignore.list && echo export HISTIGNORE=\"`sed '{:q;N;s/\n/:/g;t q}' /tmp/histignore.list `\" >> $HOME/.bashrc;

3. Edit the user's .bashrc file and verify you don't have more than one declaration of HISTIGNORE... else, just merge all the existing values into a single one HISTIGNORE="...".

'hope that will work for you, best regards.

Posted by user contact_prtg here

Created on Oct 17, 2013 9:13:26 AM by  Greg Campion [Paessler Support]

Last change on Jan 28, 2019 8:10:29 PM by  Stephan Linke [Paessler Support]



Votes:

0

We have problems at logon with last config, I use this

export HISTIGNORE="echo PAESSH_START *:[ \t]*"

Created on Jul 17, 2020 11:13:19 AM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.