+ Post New Thread
Page 3 of 3 FirstFirst 123
Results 31 to 39 of 39
*nix Thread, grep masters wanted in Technical; Originally Posted by tom_newton cp -Rv ./baz/ ./bar/ > foo seems to work here tom@flying-squirrel:/tmp/foo$ cat foo `./baz/' -> `./bar/baz' ...
  1. #31
    ind1ekid's Avatar
    Join Date
    Jul 2008
    Location
    Nottinghamshire
    Posts
    82
    Thank Post
    6
    Thanked 16 Times in 13 Posts
    Rep Power
    10
    Quote Originally Posted by tom_newton View Post
    cp -Rv ./baz/ ./bar/ > foo

    seems to work here

    tom@flying-squirrel:/tmp/foo$ cat foo
    `./baz/' -> `./bar/baz'
    `./baz/flibb' -> `./bar/baz/flibb'
    `./baz/quux' -> `./bar/baz/quux'
    Cheers Worked a charm, I wasnt far off I guess!

  2. IDG Tech News

  3. #32

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,855
    Thank Post
    412
    Thanked 774 Times in 647 Posts
    Rep Power
    168
    ...what exactly did you do differently? I used your exact command to test.

  4. #33
    ind1ekid's Avatar
    Join Date
    Jul 2008
    Location
    Nottinghamshire
    Posts
    82
    Thank Post
    6
    Thanked 16 Times in 13 Posts
    Rep Power
    10
    Quote Originally Posted by powdarrmonkey View Post
    ...what exactly did you do differently? I used your exact command to test.
    lol... i have no idea now ive just looked at them both again its working now anyway!

  5. #34

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,747
    Blog Entries
    6
    Thank Post
    1,015
    Thanked 427 Times in 272 Posts
    Rep Power
    141
    Quote Originally Posted by plexer View Post
    I'll look it up when I'm back at work next week.

    Ben
    Just a nudge in case this had slipped your mind.

    Im installing nagios just now and all our printers are those HPs pretty much..

  6. #35

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    9,563
    Thank Post
    306
    Thanked 884 Times in 794 Posts
    Rep Power
    211
    Thanks for the nudge I hadn't forgotten I just hadn't got round to doing it yet.

    I've posted it up on my blog plextech

    Thanks.

    Ben

  7. Thanks to plexer from:

    RabbieBurns (6th November 2009)

  8. #36

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,747
    Blog Entries
    6
    Thank Post
    1,015
    Thanked 427 Times in 272 Posts
    Rep Power
    141
    Thankfully I cant access work from home, so ill need to give it a try on Monday... Thanks in advance though

  9. #37

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,747
    Blog Entries
    6
    Thank Post
    1,015
    Thanked 427 Times in 272 Posts
    Rep Power
    141
    Quote Originally Posted by plexer View Post
    Thanks for the nudge I hadn't forgotten I just hadn't got round to doing it yet.

    I've posted it up on my blog plextech

    Thanks.

    Ben
    How do I go about installing it as a plugin?

  10. #38

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,747
    Blog Entries
    6
    Thank Post
    1,015
    Thanked 427 Times in 272 Posts
    Rep Power
    141
    OK this seems to be working.. But how now do I implement it into nagios??

    Code:
    root@nagios:/usr/local/nagios/libexec# php check_hp2600.php -H 10.0.5.101 -c 10 -w 15
    TONER OK C:32 M:99 Y:32 K:22

  11. #39

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,747
    Blog Entries
    6
    Thank Post
    1,015
    Thanked 427 Times in 272 Posts
    Rep Power
    141
    Got it sorted!

    I had to add this to commands.cfg

    Code:
    # 'check_hp2600' command definition
    define command{
    		command_name	check_hp2600
    		command_line	php /usr/local/nagios/libexec/check_hp2600.php -H $HOSTADDRESS$ -c 10 -w 15
    		}
    And then in printers.cfg i made a new group called 2600-printers which calls the previous command

    Code:
    define service{
    	use			generic-service		; Inherit values from a template
    	hostgroup_name		2600-printers		; The name of the host the service is associated with
    	service_description	Printer Status		; The service description
    #	check_command		check_hpjd!-C public	; The command used to monitor the service
    	check_command		check_hp2600	; The command used to monitor the service
    	normal_check_interval	10	; Check the service every 10 minutes under normal conditions
    	retry_check_interval	1	; Re-check the service every minute until its final/hard state is determined
    	}
    And then just specified all the printers in host declarations

    Code:
    define host{
    	use		generic-printer		; Inherit default values from a template
    	host_name	10.0.5.101		; The name we're giving to this printer
    	alias		10.0.5.101	; A longer name associated with the printer
    	address		10.0.5.101		; IP address of the printer
    	hostgroups	2600-printers 	; Host groups this printer is associated with
    notifications_enabled	0		; disable emails for this check	
    }
    I hope this helps someone else

SHARE:
+ Post New Thread
Page 3 of 3 FirstFirst 123

Similar Threads

  1. WANTED: Tablet PC
    By binky in forum General Chat
    Replies: 3
    Last Post: 26th October 2007, 01:45 PM
  2. audio wanted..
    By russdev in forum General EduGeek News/Announcements
    Replies: 0
    Last Post: 4th December 2006, 10:15 AM
  3. Grep syntax for multiple srtings?
    By ChrisH in forum *nix
    Replies: 17
    Last Post: 14th October 2006, 08:20 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •