Nagios check memory plugin - memory

Why doesn't Nagios have a check_memory as part of the initial set of plugins that come by default? Like check_http, check_load etc?
Thanks!

According to Nagios Plugins the plugins in that project need to meet certain criteria, here is a statement from the FAQ:
There are two types of plugins included in the distribution:
Plugins that are officially maintained by the nagios plugin
developer team
Plugins that are distributed in the contrib directory
Sooner or later all the contrib plugins should be hosted at the
official 3rd Party Nagios plugin page Nagios Exchange
Contrib plugins have to be installed manually. They are not affected
by the build process.
Here is a list of the actively maintained Plugins:
check_apt, check_breeze, check_by_ssh, check_clamd, check_cluster,
check_dhcp, check_dig, check_disk, check_disk_smb, check_dns,
check_dummy, check_file_age, check_flexlm, check_fping, check_ftp,
check_game, check_hpjd, check_http, check_icmp, check_ide_smart,
check_ifoperstatus, check_ifstatus, check_imap, check_ircd,
check_jabber, check_ldap, check_load, check_log, check_mailq,
check_mrtg, check_mrtgtraf, check_mssql, check_mysql,
check_mysql_query, check_nagios, check_netdns, check_nntp,
check_nntps, check_nt, check_ntp_peer, check_ntp_time, check_nwstat,
check_oracle, check_overcr, check_pgsql, check_ping, check_pop,
check_procs, check_radius, check_real, check_rpc, check_sensors,
check_simap, check_smtp, check_snmp, check_spop, check_ssh,
check_ssmtp, check_swap, check_tcp, check_time, check_udp, check_ups,
check_users, check_wave
And these plugins are currently distributed in the contrib directory:
check_adptraid, check_apache, check_apc_ups, check_appletalk,
check_arping, check_asterisk, check_axis, check_backup,
check_bgpstate, check_breeze, check_cluster, check_cluster2,
check_compaq_insight, check_cpqarray, check_digitemp,
check_dlswcircuit, check_dns_random, check_email_loop,
check_fan_cpq_present, check_fan_fsc_present, check_flexlm,
check_frontpage, check_hltherm, check_hprsc,
check_http-with-client-certificate, check_hw,
check_ica_master_browser, check_ica_metaframe_pub_apps,
check_ica_program_neigbourhood, check_inodes, check_inodes-freebsd,
check_ipxping, check_javaproc, check_joy, check_linux_raid,
check_lmmon, check_log2, check_lotus, check_maxchannels,
check_maxwanstate, check_mem, check_ms_spooler, check_mssql,
check_nagios, check_nagios_db, check_nagios_db_pg, check_netapp,
check_nmap, check_oracle_instance, check_oracle_tbs,
check_ora_table_space, check_pcpmetric, check_pfstate, check_qmailq,
check_rbl, check_remote_nagios_status, check_rrd_data, check_sap,
check_smart, check_smb, check_snmp_disk_monitor, check_snmp_printer,
check_snmp_process_monitor, check_snmp_procs, check_sockets,
check_temp_cpq, check_temp_fsc, check_timeout, check_traceroute,
check_traceroute-pure_perl, check_uptime, check_vcs, check_wave,
check_wins
As you can see there isn't an official check_memory plugin included in the maintained plugins, however you can find plugins that do support what you are looking for on Naigos Exchange.

if you install nagios-snmp-plugins from http://nagios.manubulon.com/ then you should have check_snmp_mem.pl and that will do the memory monitoring

Related

How to automatically manage and update CDK version with Projen?

Context:
Projen is an awesome tool to generate and manage (JSII-built) AWS CDK projects.
Background:
Previously I have managed CDK dependencies with RenovateBot's group:aws-cdkMonorepo preset. This will result in RenovateBot creating a single Github Pull Request for AWS CDK depedency updates.
Question:
With Projen, one controls the CDK version in .projenrc.js:
const { AwsCdkConstructLibrary } = require('projen');
const project = new AwsCdkConstructLibrary({
authorName: "Example",
authorAddress: "contact#example.com",
cdkVersion: "1.64.0",
name: "#example/project",
repository: "https://github.com/example/project.git",
});
project.synth();
So how can one manage that cdkVersion value with tooling such as DependaBot or RenovateBot?
Since keeping one's CDK constructs up-to-date with current CDK version is critial and with multiple CDK constructs doing it by hand will be painful.
The central version management depends on your requirement. If you are using a centralized construct library it is a must-have.
For managing the dependencies in centrally in a single configuration, you need to add the following snippet in the .projenrc.js
cdkDependecies:[
'#aws-cdk/core'
]
Now, whenever you run projen the cdk app would be managed centrally and use the latest version.

How to list all available jenkins plugins using command list with their short names

I want to list all available plugins names and their short names using command line option, so that I could automate required plugin installation through jenkins command line.
Kindly advise. Thanks
So far I tried to find answer on same however I got answer only for how to list installed plugins, not for all available plugins.
I've found this link http://updates.jenkins-ci.org/download/plugins/ which lists all plugins but with their short names only
You were so close! The LAYOUT is detailed here. The information is nearby for you to parse, hopefully I got it right.
http://updates.jenkins-ci.org/download/plugins/ is indeed the location of the plugins, with the actual plugin versions sitting inside each folder.
https://updates.jenkins.io/ is the root level. You will find the list of all plugins and details at plugin-versions.json.
update-center.js, update-center.json, and update-center.json.html contain actual update center metadata in JSON, JSONP, and HTML format respectively. You can parse the json to pull everything you are looking for. There are also lists for the documentation url and the release history, as well as the updates.
This is where it's nuanced; there's stable (ie:LTS) or latest (ie:weekly) and major releases of each. Each one has its own sublist, depending on minimum version and compatibility.
Plugin Selection
Since none of this tells you what the plugins actually do, the best thing is to choose your plugins at https://plugins.jenkins.io/. Clicking on any plugin (eg: mailer) reveals a header block with details:
Mailer 1.23
Minimum Jenkins requirement: 1.642.3
ID: mailer
The ID is the short name you are looking for. Go through and find the plugins you want to use and that's your list. Don't worry about the dependencies.
About Plugin Management
Even on a standalone instance, I use a modified script of Docker install_plugins.sh to generate the full list of plugins to install .
Update 2021: As part of GSOC 2019 and refined in GSOC 2020, a new and quite functional Plugin Installation Manager CLI Tool has been introduced to replace all non-GUI plugin mgmt tools, including inatall_plugins.sh. Achieves similar results.
You can examine the outputs or use the groovy script that follows to simplify your "must have" list. Also, as dependency updates happen all the time, I also generate a list of actual installed updates if I need to reapply identically to a different instance rather than from my curated list. My curated list is ~45 plugins, with over 115 getting installed.
eg: workflow-api includes [workflow-scm-step] which includes [git, subversion], so no need to specify git. But you want to know which version you got. Occasionally you may need to explicitly add a dependency to get the latest to avoid a defect, per JENKINS-54018, plugins which were split from Jenkins.
println "Jenkins Instance : " + Jenkins.getInstance().getComputer('').getHostName() + " - " + Jenkins.getInstance().getRootUrl()
println "Installed Plugins: "
println "=================="
Jenkins.instance.pluginManager.plugins.sort(false) { a, b -> a.getShortName().toLowerCase() <=> b.getShortName().toLowerCase()}.each { plugin ->
println "${plugin.getShortName()}:${plugin.getVersion()} | ${plugin.getDisplayName()} "
}
println""
println "Plugins Dependency tree (...: dependencies; +++: dependants) :"
println "======================="
Jenkins.instance.pluginManager.plugins.sort(false) { a, b -> a.getShortName().toLowerCase() <=> b.getShortName().toLowerCase()}.each { plugin ->
println "${plugin.getShortName()}:${plugin.getVersion()} | ${plugin.getDisplayName()} "
println "+++ ${plugin.getDependants()}"
println "... ${plugin.getDependencies()}"
println ''
}
return

How can I enable clang-tidy's "modernize" checks?

I just installed ClangOnWin,and I'm trying to get clang-tidy's "modernize" checks to work. Unfortunately, clang-tidy doesn't seem to know about them: clang-tidy -list-checks foo.cpp -- | grep modernize produces no output.
The "modernize" checks are listed here, but that page seems to document Clang 3.8, and the version I have installed is 3.7. However, version 3.7 is the current one listed at the LLVM Download Page.
clang-tidy knows about a variety of security checks, so I think I have it installed correctly. For example, clang-tidy -list-checks foo.cpp -- | grep security yields this:
clang-analyzer-security.FloatLoopCounter
clang-analyzer-security.insecureAPI.UncheckedReturn
clang-analyzer-security.insecureAPI.getpw
clang-analyzer-security.insecureAPI.gets
clang-analyzer-security.insecureAPI.mkstemp
clang-analyzer-security.insecureAPI.mktemp
clang-analyzer-security.insecureAPI.rand
clang-analyzer-security.insecureAPI.strcpy
clang-analyzer-security.insecureAPI.vfork
Is there something special I need to do to enable checks such as modernize-use-override and modernize-use-nullptr?
The modernize checks were added after 3.7 (ported from clang-modernize), but try adding -checks="*" to see the whole list of available checks.
clang-tidy -list-checks -checks="*" foo.cpp --
Have you tried with the official binaries from LLVM: http://llvm.org/releases/download.html ? Maybe the ClangOnWin binaries are not compiled with all options, or something of that kind.

OpenCV TBB IPP OpenMP functions

Is there a list of functions/methods of OpenCV that have been optimized with IPP and/or TBB and/or OpenMP?
Disclaimer: I have no experience in OpenCV usage.
I found no such a list on the official opencv.org site. However, the ChangeLog says:
switched all the remaining parallel loops from TBB-only tbb::parallel_for() to universal cv::parallel_for_() with many possible backends (MS Concurrency, Apple's GDC, OpenMP, Intel TBB etc.)
Now, we know what to search and grep -IRl parallel_for_ applied on opencv directory gives us the following:
build/include/opencv2/core/core.hpp
sources/apps/traincascade/boost.cpp
sources/modules/calib3d/src/stereobm.cpp
sources/modules/contrib/src/basicretinafilter.cpp
sources/modules/contrib/src/magnoretinafilter.cpp
sources/modules/contrib/src/parvoretinafilter.cpp
sources/modules/contrib/src/retinacolor.cpp
sources/modules/contrib/src/templatebuffer.hpp
sources/modules/core/include/opencv2/core/core.hpp
sources/modules/core/src/matrix.cpp
sources/modules/core/src/parallel.cpp
sources/modules/core/src/stat.cpp
sources/modules/features2d/src/detectors.cpp
sources/modules/gpu/src/calib3d.cpp
sources/modules/highgui/test/test_ffmpeg.cpp
sources/modules/imgproc/src/clahe.cpp
sources/modules/imgproc/src/color.cpp
sources/modules/imgproc/src/distransform.cpp
sources/modules/imgproc/src/generalized_hough.cpp
sources/modules/imgproc/src/histogram.cpp
sources/modules/imgproc/src/imgwarp.cpp
sources/modules/imgproc/src/morph.cpp
sources/modules/imgproc/src/smooth.cpp
sources/modules/imgproc/src/thresh.cpp
sources/modules/ml/src/ann_mlp.cpp
sources/modules/ml/src/gbt.cpp
sources/modules/ml/src/knearest.cpp
sources/modules/ml/src/nbayes.cpp
sources/modules/ml/src/svm.cpp
sources/modules/nonfree/src/surf.cpp
sources/modules/objdetect/src/cascadedetect.cpp
sources/modules/objdetect/src/haar.cpp
sources/modules/objdetect/src/hog.cpp
sources/modules/ocl/src/kmeans.cpp
sources/modules/photo/src/denoising.cpp
sources/modules/stitching/src/matchers.cpp
sources/modules/superres/src/btv_l1.cpp
sources/modules/video/src/bgfg_gaussmix2.cpp
sources/modules/video/src/bgfg_gmg.cpp
sources/modules/video/src/lkpyramid.cpp
sources/modules/video/src/tvl1flow.cpp
Here, we see the list of modules and parts which use the parallel loop. I hope it's enough to answer the question for TBB and OpenMP. For more details, please open the corresponding file and search for parallel_for_ to find out in which circumstances it is applied.
As for IPP, it seems it is quite extensively used by the core library, egrep -IRl '\bipp' gives the following:
modules/calib3d/src/calibration.cpp
modules/core/include/opencv2/core/core_c.h
modules/core/include/opencv2/core/internal.hpp
modules/core/src/arithm.cpp
modules/core/src/dxt.cpp
modules/core/src/mathfuncs.cpp
modules/core/src/matmul.cpp
modules/core/src/precomp.hpp
modules/core/src/stat.cpp
modules/core/src/system.cpp
modules/imgproc/src/canny.cpp
modules/imgproc/src/color.cpp
modules/imgproc/src/deriv.cpp
modules/imgproc/src/distransform.cpp
modules/imgproc/src/filter.cpp
modules/imgproc/src/imgwarp.cpp
modules/imgproc/src/morph.cpp
modules/imgproc/src/samplers.cpp
modules/imgproc/src/smooth.cpp
modules/imgproc/src/sumpixels.cpp
modules/legacy/test/test_pyrsegmentation.cpp
modules/objdetect/src/haar.cpp
modules/objdetect/src/hog.cpp
modules/ocl/src/haar.cpp

CC.NET Checkout Based on TFS Label

How do you pull code based on a build label from Team Foundation Server in CruiseControl.NET.
<sourcecontrol type="vsts" autoGetSource="true" applyLabel="true">
<server>http://tfs.internal.com:8080/</server>
<username>*********</username>
<password>*********</password>
<domain>corp</domain>
<project>$/Code</project>
<workingDirectory>D:\BuildServer\Lane1\SourceCode\</workingDirectory>
<cleanCopy>false</cleanCopy>
</sourcecontrol>
According to the documentation for CruiseControl.NET TFS plugin (from codeplex):
<sourcecontrol type="vsts" autoGetSource="true" applyLabel="true">
<server>http://my_team_foundation_server:8080</server>
<username>my_user</username>
<password>my_password</password>
<domain>my_domain</domain>
<project>$/Foobar</project>
<workingDirectory>c:\projects\Foobar</workingDirectory>
<cleanCopy>false</cleanCopy>
<workspace>my_workspace_name</workspace>
<deleteWorkspace>false</deleteWorkspace>
</sourcecontrol>
I do not see this as an option.
I did look at the general TFS sourcecontrol block documentation here and you may be able to use as a way to passing the label as a parameter to the executable. I have not ever tried that with Visual Studio but maybe you can figure out what if you can use dynamicValues as a parameter for specifying your label against the compiler. If not, I do not think CruiseControl.NET can support these TFS features.

Resources