<commit_before>#!/bin/bash
# create_template_cisco_snmp.sh
# version 1.00
# 01/02/2020


create_cmd_cisco_snmp() {
       

  # cmd_net_cisco_snmp_environment
  exist_object CMD cmd_net_cisco_snmp_environment
  [ $? -ne 0 ] && exec_clapi CMD ADD "cmd_net_cisco_snmp_environment;check; \$CENTREONPLUGINS\$/centreon_cisco_standard_snmp.pl --plugin=network::cisco::standard::snmp::plugin --mode=environment --hostname=$HOSTADDRESS$ --snmp-version='\$_HOSTSNMPVERSION\$' --snmp-community='\$_HOSTSNMPCOMMUNITY\$' --component='\$_SERVICECOMPONENT\$' \$_HOSTSNMPOPTION\$ \$_SERVICEOPTION\$"

  # cmd_net_cisco_snmp_cpu
  exist_object CMD cmd_net_cisco_snmp_cpu 
  [ $? -ne 0 ] && exec_clapi CMD ADD "cmd_net_cisco_snmp_cpu;check;\$CENTREONPLUGINS\$/centreon_cisco_standard_snmp.pl --plugin=network::cisco::standard::snmp::plugin --mode=cpu --hostname=\$HOSTADDRESS\$ --snmp-version='\$_HOSTSNMPVERSION\$' --snmp-community='\$_HOSTSNMPCOMMUNITY\$' \$_HOSTSNMPOPTION\$ --warning-core-5s='\$_SERVICEWARNINGCORE5S\$' --critical-core-5s='\$_SERVICECRITICALCORE5S\$' --warning-core-1m='\$_SERVICEWARNINGCORE1M\$' --critical-core-1m='\$_SERVICECRITICALCORE1M\$' --warning-core-5m='\$_SERVICEWARNINGCORE5M\$' --critical-core-5m='\$_SERVICECRITICALCORE5M\$' --warning-average-5s='\$_SERVICEWARNINGAVERAGE5S\$' --critical-average-5s='\$_SERVICECRITICALAVERAGE5S\$' --warning-average-1m='\$_SERVICEWARNINGAVERAGE1M\$' --critical-average-1m='\$_SERVICECRITICALAVERAGE1M\$' --warning-average-5m='\$_SERVICEWARNINGAVERAGE5M\$' --critical-average-5m='\$_SERVICECRITICALAVERAGE5M\$' \$_SERVICEOPTION\$"

  # cmd_net_cisco_snmp_memory
  exist_object CMD cmd_net_cisco_snmp_memory
  [ $? -ne 0 ] && exec_clapi CMD ADD "cmd_net_cisco_snmp_memory;check;\$CENTREONPLUGINS\$/centreon_cisco_standard_snmp.pl --plugin=network::cisco::standard::snmp::plugin --mode=memory --hostname=\$HOSTADDRESS\$ --snmp-version='\$_HOSTSNMPVERSION\$' --snmp-community='\$_HOSTSNMPCOMMUNITY\$' \$_HOSTSNMPOPTION\$ --warning-usage='\$_SERVICEWARNING\$' --critical-usage='\$_SERVICECRITICAL\$' \$_SERVICEOPTION\$"

  # cmd_net_cisco_snmp_traffic_global
  exist_object CMD cmd_net_cisco_snmp_traffic_global
  [ $? -ne 0 ] && exec_clapi CMD ADD "cmd_net_cisco_snmp_traffic_global;check;\$CENTREONPLUGINS\$/centreon_cisco_standard_snmp.pl --plugin=network::cisco::standard::snmp::plugin --mode=interfaces --hostname=\$HOSTADDRESS\$ --snmp-version='\$_HOSTSNMPVERSION\$' --snmp-community='\$_HOSTSNMPCOMMUNITY\$' \$_HOSTSNMPOPTION\$ --interface='\$_SERVICEFILTER\$' --name --add-status --add-traffic --critical-status='\$_SERVICECRITICALSTATUS\$' --warning-in-traffic='\$_SERVICEWARNINGIN\$' --critical-in-traffic='\$_SERVICECRITICALIN\$' --warning-out-traffic='\$_SERVICEWARNINGOUT\$' --critical-out-traffic='\$_SERVICECRITICALOUT\$' \$_SERVICEOPTION\$"


}

create_stpl_cisco_snmp() {

  ## CPU snmp
  #stpl_net_cisco_snmp_cpu
  exist_object STPL stpl_os_windows_snmp_cpu<commit_msg>bug fix stpl_net_cisco_snmp_cpu<commit_after>#!/bin/bash
# create_template_cisco_snmp.sh
# version 1.00
# 01/02/2020


create_cmd_cisco_snmp() {
       

  # cmd_net_cisco_snmp_environment
  exist_object CMD cmd_net_cisco_snmp_environment
  [ $? -ne 0 ] && exec_clapi CMD ADD "cmd_net_cisco_snmp_environment;check; \$CENTREONPLUGINS\$/centreon_cisco_standard_snmp.pl --plugin=network::cisco::standard::snmp::plugin --mode=environment --hostname=$HOSTADDRESS$ --snmp-version='\$_HOSTSNMPVERSION\$' --snmp-community='\$_HOSTSNMPCOMMUNITY\$' --component='\$_SERVICECOMPONENT\$' \$_HOSTSNMPOPTION\$ \$_SERVICEOPTION\$"

  # cmd_net_cisco_snmp_cpu
  exist_object CMD cmd_net_cisco_snmp_cpu 
  [ $? -ne 0 ] && exec_clapi CMD ADD "cmd_net_cisco_snmp_cpu;check;\$CENTREONPLUGINS\$/centreon_cisco_standard_snmp.pl --plugin=network::cisco::standard::snmp::plugin --mode=cpu --hostname=\$HOSTADDRESS\$ --snmp-version='\$_HOSTSNMPVERSION\$' --snmp-community='\$_HOSTSNMPCOMMUNITY\$' \$_HOSTSNMPOPTION\$ --warning-core-5s='\$_SERVICEWARNINGCORE5S\$' --critical-core-5s='\$_SERVICECRITICALCORE5S\$' --warning-core-1m='\$_SERVICEWARNINGCORE1M\$' --critical-core-1m='\$_SERVICECRITICALCORE1M\$' --warning-core-5m='\$_SERVICEWARNINGCORE5M\$' --critical-core-5m='\$_SERVICECRITICALCORE5M\$' --warning-average-5s='\$_SERVICEWARNINGAVERAGE5S\$' --critical-average-5s='\$_SERVICECRITICALAVERAGE5S\$' --warning-average-1m='\$_SERVICEWARNINGAVERAGE1M\$' --critical-average-1m='\$_SERVICECRITICALAVERAGE1M\$' --warning-average-5m='\$_SERVICEWARNINGAVERAGE5M\$' --critical-average-5m='\$_SERVICECRITICALAVERAGE5M\$' \$_SERVICEOPTION\$"

  # cmd_net_cisco_snmp_memory
  exist_object CMD cmd_net_cisco_snmp_memory
  [ $? -ne 0 ] && exec_clapi CMD ADD "cmd_net_cisco_snmp_memory;check;\$CENTREONPLUGINS\$/centreon_cisco_standard_snmp.pl --plugin=network::cisco::standard::snmp::plugin --mode=memory --hostname=\$HOSTADDRESS\$ --snmp-version='\$_HOSTSNMPVERSION\$' --snmp-community='\$_HOSTSNMPCOMMUNITY\$' \$_HOSTSNMPOPTION\$ --warning-usage='\$_SERVICEWARNING\$' --critical-usage='\$_SERVICECRITICAL\$' \$_SERVICEOPTION\$"

  # cmd_net_cisco_snmp_traffic_global
  exist_object CMD cmd_net_cisco_snmp_traffic_global
  [ $? -ne 0 ] && exec_clapi CMD ADD "cmd_net_cisco_snmp_traffic_global;check;\$CENTREONPLUGINS\$/centreon_cisco_standard_snmp.pl --plugin=network::cisco::standard::snmp::plugin --mode=interfaces --hostname=\$HOSTADDRESS\$ --snmp-version='\$_HOSTSNMPVERSION\$' --snmp-community='\$_HOSTSNMPCOMMUNITY\$' \$_HOSTSNMPOPTION\$ --interface='\$_SERVICEFILTER\$' --name --add-status --add-traffic --critical-status='\$_SERVICECRITICALSTATUS\$' --warning-in-traffic='\$_SERVICEWARNINGIN\$' --critical-in-traffic='\$_SERVICECRITICALIN\$' --warning-out-traffic='\$_SERVICEWARNINGOUT\$' --critical-out-traffic='\$_SERVICECRITICALOUT\$' \$_SERVICEOPTION\$"


}

create_stpl_cisco_snmp() {

  ## CPU snmp
  #stpl_net_cisco_snmp_cpu
  exist_object STPL stpl_net_cisco_snmp_cpu
{'fraction_non_alphanumeric': 0.1774604793472718, 'fraction_numerical': 0.013258541560428353, 'mean_word_length': 5.979833926453144, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4815061', 'n_tokens_mistral': 2389, 'n_tokens_neox': 2268, 'n_words': 213}