Changeset 223


Ignore:
Timestamp:
Feb 18, 2017, 7:29:40 PM (7 years ago)
Author:
g7moreau
Message:
  • Add general float-regex parameter whith default value to float
  • Better doc on many command
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r222 r223  
    182182Readonly my $RE_IPv4_ADDRESS => qr{ [0-9]{1,3} \. [0-9]{1,3} \. [0-9]{1,3} \. [0-9]{1,3} }xms;
    183183
    184 Readonly my $RE_FLOAT_HOSTNAME => qr{ ^float }xms;
     184Readonly my $RE_FLOAT_HOSTNAME => $DEFAULT{'float-regex'} || qr{ ^float }xms;
    185185
    186186################################################################
     
    874874 klask version
    875875
    876  klask updatedb
     876 klask updatedb [--verbose|-v] [--verb-description|-d] [--chk-hostname|-h] [--chk-location|-l]
    877877 klask exportdb --format [txt|html]
    878  klask removedb computer*
    879  klask cleandb  --day number_of_day --repair-dns --verbose
     878 klask removedb IP* computer*
     879 klask cleandb  [--verbose|-v] --day number_of_day --repair-dns
    880880
    881881 klask updatesw
     
    890890 klask bad-vlan-id
    891891
    892  klask enable  switch port
    893  klask disable switch port
    894  klask status  switch port
     892 klask enable  [--verbose|-v] switch port
     893 klask disable [--verbose|-v] switch port
     894 klask status  [--verbose|-v] switch port
    895895END
    896896   return;
     
    26532653 klask updatedb [--verbose|-v] [--verb-description|-d] [--chk-hostname|-h] [--chk-location|-l]
    26542654 klask exportdb --format [txt|html]
    2655  klask removedb computer*
     2655 klask removedb IP* computer*
    26562656 klask cleandb  [--verbose|-v] --day number_of_day --repair-dns
    26572657
     
    27042704=head2 enable
    27052705
    2706  klask enable [--verbose|-v] switch port
     2706 klask enable  [--verbose|-v] switch port
    27072707
    27082708This command activate a port on a switch by SNMP.
     
    27262726=head2 status
    27272727
    2728  klask status [--verbose|-v] switch port
     2728 klask status  [--verbose|-v] switch port
    27292729
    27302730This command return the status of a port number on a switch by SNMP.
     
    27362736=head2 updatedb
    27372737
     2738 klask updatedb [--verbose|-v] [--verb-description|-d] [--chk-hostname|-h] [--chk-location|-l]
     2739
    27382740This command will scan networks and update a database.
    27392741To know which are the cmputer scan, you have to configure the file F</etc/klask/klask.conf>.
    27402742This file is easy to read and write because Klask use YAML format and not XML.
    27412743
    2742 
    2743 =head2 exportdb --format [txt|html]
    2744 
    2745 This command print the content of the database. There is actually only one format.
     2744Option are not stable and could be use manually when you have new switch.
     2745Maybe some option will be transfered in a future C<checksw> command!
     2746
     2747=head2 exportdb
     2748
     2749 klask exportdb --format [txt|html]
     2750
     2751This command print the content of the database. There is actually only two format : txt and html.
    27462752It's very easy to have more format, it's just need times...
    27472753
    27482754=head2 removedb
     2755
     2756 klask removedb IP* computer*
    27492757
    27502758This command remove an entry in the database.
     
    27562764=head2 cleandb
    27572765
    2758 Remove double entry (same MAC-Address) when the older one is older than X day (C<--day>) the new one.
    2759 Computer name beginning by 'float' are not really taken into account but could be remove.
    2760 
    2761 When reverse DNS has not be done, option C<--repair-dns> force reverse DNS check on unkown host.
     2766 klask cleandb  [--verbose|-v] --day number_of_day --repair-dns
     2767
     2768Remove double entry (same MAC-Address) in the computer database when the older one is older than X day (C<--day>) the new one.
     2769Computer name beginning by 'float' (regex C<^float>) are not really taken into account but could be remove.
     2770This could be configure with the global regex parameter C<float-regex> in the configuration file F</etc/klask/klask.conf>.
     2771This functionality could be use when computer define in VLAN 1
     2772could have a float IP when they are connected on VLAN 2.
     2773In the Klask database, the float DNS entries are less important.
     2774
     2775When reverse DNS has not be done by the past, option C<--repair-dns> force reverse DNS check on all unkown host.
    27622776
    27632777=head2 updatesw
     
    27882802   community-rw: private
    27892803   snmpport: 161
     2804   float-regex: '(?^msx: ^float )'
    27902805
    27912806 network:
Note: See TracChangeset for help on using the changeset viewer.