From 3c5a4eada7bcde8992c23be2766a4a26ff096305 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 19 May 2022 09:02:44 -0400 Subject: [PATCH 1/2] Use https where possible (#27774) --- .../monitoring-your-appliance/monitoring-using-snmp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/admin/enterprise-management/monitoring-your-appliance/monitoring-using-snmp.md b/content/admin/enterprise-management/monitoring-your-appliance/monitoring-using-snmp.md index 83d8dda6b5..a4a2896b60 100644 --- a/content/admin/enterprise-management/monitoring-your-appliance/monitoring-using-snmp.md +++ b/content/admin/enterprise-management/monitoring-your-appliance/monitoring-using-snmp.md @@ -17,7 +17,7 @@ topics: --- SNMP is a common standard for monitoring devices over a network. We strongly recommend enabling SNMP so you can monitor the health of {% data variables.product.product_location %} and know when to add more memory, storage, or processor power to the host machine. -{% data variables.product.prodname_enterprise %} has a standard SNMP installation, so you can take advantage of the [many plugins](http://www.monitoring-plugins.org/doc/man/check_snmp.html) available for Nagios or for any other monitoring system. +{% data variables.product.prodname_enterprise %} has a standard SNMP installation, so you can take advantage of the [many plugins](https://www.monitoring-plugins.org/doc/man/check_snmp.html) available for Nagios or for any other monitoring system. ## Configuring SNMP v2c @@ -72,7 +72,7 @@ If you enable SNMP v3, you can take advantage of increased user based security t #### Querying SNMP data -Both hardware and software-level information about your appliance is available with SNMP v3. Due to the lack of encryption and privacy for the `noAuthNoPriv` and `authNoPriv` security levels, we exclude the `hrSWRun` table (1.3.6.1.2.1.25.4) from the resulting SNMP reports. We include this table if you're using the `authPriv` security level. For more information, see the "[OID reference documentation](http://oidref.com/1.3.6.1.2.1.25.4)." +Both hardware and software-level information about your appliance is available with SNMP v3. Due to the lack of encryption and privacy for the `noAuthNoPriv` and `authNoPriv` security levels, we exclude the `hrSWRun` table (1.3.6.1.2.1.25.4) from the resulting SNMP reports. We include this table if you're using the `authPriv` security level. For more information, see the "[OID reference documentation](https://oidref.com/1.3.6.1.2.1.25.4)." With SNMP v2c, only hardware-level information about your appliance is available. The applications and services within {% data variables.product.prodname_enterprise %} do not have OIDs configured to report metrics. Several MIBs are available, which you can see by running `snmpwalk` on a separate workstation with SNMP support in your network: From d5cef9c5d6d7d7bdda2b1c058ec8aadb4bdfa6ca Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 19 May 2022 09:12:07 -0400 Subject: [PATCH 2/2] run link checker against localhost:4000 instead of prod (#27757) * run link checker against localhost:4000 instead of prod * exclude docs.github.com * print output if possible * upload broken_links.md as artifact * debug broken_links.md --- .github/workflows/check-all-english-links.yml | 32 +++++++++++++++++-- .../check-broken-links-github-github.yml | 2 ++ script/check-english-links.js | 10 ++++-- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-all-english-links.yml b/.github/workflows/check-all-english-links.yml index cc163d320e..55d0dc252b 100644 --- a/.github/workflows/check-all-english-links.yml +++ b/.github/workflows/check-all-english-links.yml @@ -32,15 +32,32 @@ jobs: with: node-version: 16.14.x cache: npm - - name: npm ci + + - name: Install dependencies run: npm ci + - name: Cache nextjs build uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 with: path: .next/cache key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }} - - name: npm run build + + - name: Build server run: npm run build + + - name: Start server in the background + env: + NODE_ENV: production + PORT: 4000 + DISABLE_OVERLOAD_PROTECTION: true + DISABLE_RENDER_CACHING: true + # We don't want or need the changelog entries in this context. + CHANGELOG_DISABLED: true + run: | + node server.mjs & + sleep 5 + curl --retry-connrefused --retry 3 -I http://localhost:4000/ + - name: Run script run: | script/check-english-links.js > broken_links.md @@ -53,6 +70,16 @@ jobs: # # https://docs.github.com/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions + - if: ${{ failure() }} + name: Debug broken_links.md + run: | + ls -lh broken_links.md + wc -l broken_links.md + - uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 + if: ${{ failure() }} + with: + name: broken_links + path: ./broken_links.md - if: ${{ failure() }} name: Get title for issue id: check @@ -63,7 +90,6 @@ jobs: uses: peter-evans/create-issue-from-file@b4f9ee0a9d4abbfc6986601d9b1a4f8f8e74c77e with: token: ${{ env.GITHUB_TOKEN }} - title: ${{ steps.check.outputs.title }} content-filepath: ./broken_links.md repository: ${{ env.REPORT_REPOSITORY }} diff --git a/.github/workflows/check-broken-links-github-github.yml b/.github/workflows/check-broken-links-github-github.yml index 020039f105..7e715248c5 100644 --- a/.github/workflows/check-broken-links-github-github.yml +++ b/.github/workflows/check-broken-links-github-github.yml @@ -57,6 +57,8 @@ jobs: env: NODE_ENV: production PORT: 4000 + DISABLE_OVERLOAD_PROTECTION: true + DISABLE_RENDER_CACHING: true run: | node server.mjs & diff --git a/script/check-english-links.js b/script/check-english-links.js index 3b2411bab2..edba4263c7 100755 --- a/script/check-english-links.js +++ b/script/check-english-links.js @@ -25,7 +25,7 @@ import libLanguages from '../lib/languages.js' const __dirname = path.dirname(fileURLToPath(import.meta.url)) const checker = new LinkChecker() -const root = 'https://docs.github.com' +const root = 'http://localhost:4000' const englishRoot = `${root}/en` // Links with these codes may or may not really be broken. @@ -66,7 +66,13 @@ const config = { recurse: !program.opts().dryRun, silent: true, // The values in this array are treated as regexes. - linksToSkip: linksToSkipFactory([enterpriseReleasesToSkip, ...languagesToSkip, ...excludedLinks]), + linksToSkip: linksToSkipFactory([ + enterpriseReleasesToSkip, + ...languagesToSkip, + ...excludedLinks, + // Don't leak into the production site + /https:\/\/docs\.github\.com/, + ]), } // Return a function that can as quickly as possible check if a certain