New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


remove PAESSHSTART and PAESSHEND from history

Votes:

0

Your Vote:

Up

Down

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 by  amirtal (10) 1

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



3 Replies

Accepted Answer

Votes:

0

Your Vote:

Up

Down

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 [Paessler Support]



Votes:

1

Your Vote:

Up

Down

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 by  amirtal (10) 1

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



Votes:

0

Your Vote:

Up

Down

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]



Please log in or register to enter your reply.


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.