Skip to content

Commit

Permalink
api upload
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmccarron committed Dec 6, 2023
1 parent 14ad717 commit 4771e3c
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 17 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 22 additions & 3 deletions docs/rseries_diagnostics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ To copy one of the qkview files to the local client machine enter the following
POST https://{{rseries_appliance1_ip}}:8888/restconf/data/f5-utils-file-transfer:file/f5-file-download:download-file/f5-file-download:start-download
For the **Headers** secion of the Postman request be sure to add the following headers:

.. image:: images/rseries_diagnostics/headers.png
:align: center
:scale: 70%

If you are using Postman, in the body of the API call select **Body**, then selct **form-data**. Then enter the **file-name**, **path**, and **token** as seen below.

.. image:: images/rseries_diagnostics/downloadqkviewapi.png
Expand All @@ -250,7 +256,7 @@ If you are using Postman, instead of clicking **Send**, click on the arrow next
Logging
=======

F5OS has extensive logging and diagnostic capabilities, logs are stored locally on disk and can optionally be be sent to a remote syslog server. In addition, there are multiple logging subsystems that can be tweaked to be more or less verbose via the **Software Component Log Levels**. Many functions inside the F5OS layer will log their important events to the default **platform.log** file that resides in the **/log/system/** path. This is the file that will also redirect all logs to a remote location (in addition to local disk) when **Remote Log Servers** are added. There are many other log files available local on the disk (some can also be redirected to be sent remotely) for various functions. As an example, there is an **snmp.log** which logs all SNMP requests and traps that the system send and receives. Another example is the **audit.log** that captures audit related information such as "who has logged in?", "What changes were made?", "Who made the changes?", and unsuccessful login attempts. This section will provide more details on the various logging subsystems, and how to configure them.
F5OS has extensive logging and diagnostic capabilities, logs are stored locally on disk and can optionally be sent to a remote syslog server. In addition, there are multiple logging subsystems that can be tweaked to be more or less verbose via the **Software Component Log Levels**. Many functions inside the F5OS layer will log their important events to the default **platform.log** file that resides in the **/log/system/** path. This is the file that will also redirect all logs to a remote location (in addition to local disk) when **Remote Log Servers** are added. There are many other log files available local on the disk (some can also be redirected to be sent remotely) for various functions. As an example, there is an **snmp.log** which logs all SNMP requests and traps that the system sends and receives. Another example is the **audit.log** that captures audit related information such as "who has logged in?", "What changes were made?", "Who made the changes?", and unsuccessful login attempts. This section will provide more details on the various logging subsystems, and how to configure them.

There are published error catalogs for each F5OS-A release here:

Expand Down Expand Up @@ -434,6 +440,13 @@ In the body of the API call select **form-data**, and then enter the key/value p
:align: center
:scale: 70%
For the **Headers** secion of the Postman request be sure to add the following headers:
.. image:: images/rseries_diagnostics/headers.png
:align: center
:scale: 70%
If you are using Postman, instead of clicking **Send**, click on the arrow next to Send, and then select **Send and Download**. You will then be prompted to save the file to your local file system.
.. image:: images/rseries_diagnostics/sendanddownload.png
Expand Down Expand Up @@ -1786,8 +1799,14 @@ To copy one of the tcpdump files to the local client machine enter the following
POST https://{{rseries_appliance1_ip}}:8888/restconf/data/f5-utils-file-transfer:file/f5-file-download:download-file/f5-file-download:start-download
For the **Headers** secion of the Postman request be sure to add the following headers:
.. image:: images/rseries_diagnostics/headers.png
:align: center
:scale: 70%
If you are using Postman, in the body of the API call select **Body**, then selct **form-data**. Then enter the **file-name**, **path**, and **token** as seen below. Note, that the path for downloading is currently **diags/shared/** and not the full path of **diags/shared/tcpdump/**. This may change in a future release.
If you are using Postman, in the body of the API call select **Body**, then select **form-data**. Then enter the **file-name**, **path**, and **token** as seen below. Note, that the path for downloading is currently **diags/shared/** and not the full path of **diags/shared/tcpdump/**. This may change in a future release.
.. image:: images/rseries_diagnostics/downloadtcpdumpapi.png
:align: center
Expand Down Expand Up @@ -1896,7 +1915,7 @@ The built-in terminal server will switch the connection to the appropriate tenan
.. code-block:: bash
FLD-ML-00054045:~ jmccarron$ ssh [email protected] -p 7001
prompt$ssh [email protected] -p 7001
[email protected]'s password:
Successfully connected to tenant1-1 console. The escape sequence is ^]
Expand Down
15 changes: 11 additions & 4 deletions docs/rseries_f5os_configuration_backup_and_restore.rst
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ In the body of the API call, add the virtual path you want to list.
"f5-utils-file-transfer:path": "configs/"
}
You should see output similar to the example below.
You should see output like the example below.

.. code-block:: json
Expand Down Expand Up @@ -314,12 +314,19 @@ You should see output similar to the example below.
}
}
To download a specific config file use the following API call.
To download a specific config file, use the following API call.

.. code-block:: bash
POST https://{{rseries_appliance1_ip}}:8888/restconf/data/f5-utils-file-transfer:file/f5-file-download:download-file/f5-file-download:start-download
For the **Headers** secion of the Postman request be sure to add the following headers:

.. image:: images/rseries_f5os_configuration_backup_and_restore/configheaders.png
:align: center
:scale: 70%

In the body of the API call select **form-data**, and then enter the key/value pairs as seen below. The example provided will download the configuration file named **jim-july** file that resides in the **configs/** directory.

.. image:: images/rseries_f5os_configuration_backup_and_restore/configfile.png
Expand Down Expand Up @@ -442,7 +449,7 @@ The reset of the database will not completely wipe out the system configuration.

.. code-block:: bash
FLD-ML-00054045:~ jmccarron$ ssh -l admin 10.255.0.133
prompt$ssh -l admin 10.255.0.133
[email protected]'s password: *****
You are required to change your password immediately (root enforced)
Last failed login: Thu Jan 20 16:01:00 EST 2022 from 172.18.104.143 on ssh:notty
Expand All @@ -462,7 +469,7 @@ After the password is changed for the admin account, you will be disconnected an
.. code-block:: bash
FLD-ML-00054045:~ jmccarron$ ssh -l admin 10.255.0.133
prompt$ssh -l admin 10.255.0.133
[email protected]'s password:
Last login: Thu Jan 20 16:01:04 2022 from 172.18.104.143
Welcome to the Management CLI
Expand Down
76 changes: 75 additions & 1 deletion docs/rseries_monitoring_snmp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,87 @@ As of F5OS-A 1.6.0.the following F5OS Appliance MIBs are available:
- F5-PLATFORM-STATS-MIB
- F5OS-APPLIANCE-ALERT-NOTIF-MIB

Downloading MIBs
================

MIBs can be downloaded directly from the F5OS layer starting in F5OS-A v1.2.0. From the webUI, you can go to the **System Settings > File Utility** page. Then, from the **Base Directory** drop down, select the **mibs** directory to download the MIB files. There are two separate MIB files: NetSNMP and F5OS MIBs for the appliance. Download both archives and extract them to see the individual MIB files.
MIBs can be downloaded directly from the F5OS layer starting in F5OS-A v1.2.0.


Downloading MIBs via webUI
--------------------------

From the webUI, you can go to the **System Settings > File Utility** page. Then, from the **Base Directory** drop down, select the **mibs** directory to download the MIB files. There are two separate MIB files: NetSNMP and F5OS MIBs for the appliance. Download both archives and extract them to see the individual MIB files.

.. image:: images/rseries_monitoring_snmp/image8.png
:align: center
:scale: 70%

Downloading MIBs via CLI
--------------------------

From the CLI, use the file export command to transfer the MIB files to a remote server.

.. code-block:: bash
Downloading MIBs via API
--------------------------

You can utilize the F5OS API to download the MIB files directly to a client machine, or to a remote server over HTTPS, SCP, or SFTP. To list the contents of the **mibs/** directory on the rSeries appliance use the following API call.

.. code-block:: bash
POST https://{{rseries_appliance1_ip}}:8888/restconf/data/f5-utils-file-transfer:file/list
In the body of the API call add the following:

.. code-block:: json
{
"f5-utils-file-transfer:path": "mibs/"
}
This will list the contents of the mibs directory as seen below.

.. code-block:: json
You'll notice there are two separate MIB files, one is for Enterprise MIBs, while the other is for F5 specific MIBs. You'll need to download both files and add them to your SNMP manager. Below are example API calls to download each of the SNMP MIB files.

.. code-block:: bash
POST https://{{rseries_appliance1_ip}}:8888/restconf/data/f5-utils-file-transfer:file/f5-file-download:download-file/f5-file-download:start-download
For the **Headers** secion of the Postman request be sure to add the following headers:

.. image:: images/rseries_monitoring_snmp/snmpheaders.png
:align: center
:scale: 70%

If you are using Postman, in the body of the API call select **Body**, then select **form-data**. Then enter the **file-name**, **path**, and **token** as seen below.

.. image:: images/rseries_monitoring_snmp/downloadmibsapi1.png
:align: center
:scale: 70%

Repeat the same process for the other MIB file.

.. image:: images/rseries_monitoring_snmp/downloadmibsapi2.png
:align: center
:scale: 70%

If you are using Postman, instead of clicking **Send**, click on the arrow next to Send, and then select **Send and Download**. You will then be prompted to save the file to your local file system.

.. image:: images/rseries_monitoring_snmp/sendanddownload.png
:align: center
:scale: 70%

Exporting MIBs to a Remote Server via the API
---------------------------------------------



Adding Allowed IPs for SNMP
===========================

Expand Down
16 changes: 8 additions & 8 deletions docs/rseries_software_upgrades.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ You can upload F5OS-A images to the appliance via the webUI. This is done from t

Here you'll have the option to **Upload** or **Import** a new F5OS image. If you choose **Import**, you will be prompted to provide the configuration details for a remote HTTPS server where the images can be downloaded from. If you choose **Upload** you will be able to upload an image directly from your local client machine via the browser.

Alternatively, you may also upload images to the controller through the **System Settings -> File Utilities** page. You can select the **images/staging** option from the drop-down menu to import new F5OS-A images. Once uploaded into the staging area, they will be imported and made available for upgrades after a brief delay.
Alternatively, you may also upload images to the rSeries appliance via the **System Settings -> File Utilities** page. You can select the **images/staging** option from the drop-down menu to import new F5OS-A images. Once uploaded into the staging area, they will be imported and made available for upgrades after a brief delay.

.. image:: images/rseries_software_upgrades/image5.png
:align: center
:scale: 70%



After the upload completes, it will take some time for it to be fully imported and verified. At that point it should show up in the CLI and webUI. If you don’t see it immediately, be patient and wait a few minutes for it to show up as it will not show up until the file has been verified. Inside the **ISO** file are two different types of software, the **OS** and the **Service**. All three types should be displayed in the **Software Management** page. In the example below the ISO for version 1.0.0-11432 consists of an **OS** and **Service** with the same version number.
After the upload completes, it will take some time for it to be fully imported and verified. At that point it should show up in the CLI and webUI. If you don’t see it immediately, be patient and wait a few minutes for it to show up as it may take come time to verify the image file. Inside the **ISO** file are two different types of software, the **OS** and the **Service**. All three types should be displayed in the **Software Management** page. In the example below the ISO for version 1.0.0-11432 consists of an **OS** and **Service** with the same version number.

.. image:: images/rseries_software_upgrades/image6.png
:align: center
:scale: 70%

When upgrading the F5OS platform layer, you will have a choice of upgrading either a **Bundled** release, meaning **OS** and **Services** are bundled together in an ISO image or **Unbundled**, where you can upgrade Service and/or OS independently. Note that currently F5 has not released any Service only or OS only releases, but they may be an option in the future. For now, it is recommended to choose **Bundled** upgrades.
When upgrading the F5OS platform layer, you will have a choice of upgrading either a **Bundled** release, meaning **OS** and **Services** are bundled together in an ISO image or **Unbundled**, where you can upgrade Service and/or OS independently. Note that currently, F5 has not released any Service only or OS only releases, but they may be an option in the future. For now, it is recommended to choose **Bundled** upgrades.

.. image:: images/rseries_software_upgrades/image7.png
:align: center
Expand All @@ -64,7 +64,7 @@ When upgrading the F5OS platform layer, you will have a choice of upgrading eith
Uploading F5OS Images via the CLI
---------------------------------

If you would prefer to upload the F5OS image via the CLI this can be done with the **file import** command. Use the **file import** command to get the F5OS image file from a remote HTTPS server or from a remote server over SCP or SFTP. Below is an example importing from a remote HTTPS server. Note the target directory should be **images/staging**:
If you would prefer to upload the F5OS image via the CLI, this can be done with the **file import** command. Use the **file import** command to get the F5OS image file from a remote HTTPS server or from a remote server over SCP or SFTP. Below is an example importing from a remote HTTPS server. Note the target directory should be **images/staging**:

.. code-block:: bash
Expand All @@ -73,7 +73,7 @@ If you would prefer to upload the F5OS image via the CLI this can be done with t
result File transfer is initiated.(images/staging/F5OS-A-1.0.0-11432.R5R10.iso)
Boston-r10900-1#
If a remote HTTPS server is not available you may also copy the file from the CLI over SCP by adding the **protocol scp** option to the command line:
If a remote HTTPS server is not available, you may also copy the file from the CLI over SCP by adding the **protocol scp** option to the command line:

.. code-block:: bash
Expand Down Expand Up @@ -120,7 +120,7 @@ You can view the current F5OS images and their status in the F5OS CLI by using t
1.0.0-11432 ready 2021-12-03 false
You can alternatively copy the F5OS images into the management IP address of F5OS from a client machine over SCP. You would use the **root** account and the target directory should be **/var/import/staging/**.
You can alternatively copy the F5OS images into the management IP address of F5OS from a client machine over SCP. You would use the **root** account and the target directory should be **/var/import/staging/**. Currently, only the root account can copy F5OS images into the system over SCP. An enhancement currently being worked on will allow the admin account to copy F5OS images into the system over SCP.

.. code-block:: bash
Expand All @@ -133,7 +133,7 @@ Importing F5OS-A Images from a Remote Server via the API
When uploading or importing F5OS-A images into the rSeries appliance, the files should be imported into the **images/staging** directory. Once the file import is initiated you can check its status using the **file transfer-status** API calls. Below are API calls to upload and/or import F5OS images and monitor status.
List the current F5OS images in the **images/staging** directory via the following API call:
You may list the current F5OS images in the **images/staging** directory via the following API call:
.. code-block:: bash
Expand Down Expand Up @@ -370,7 +370,7 @@ In the body of the API call enter the **size**, **name**, and **file-path** as s
"file-path": "images/staging/"
}
If you are using Postman the API call above will generate an upload-id that will need to be captured so it can be used in the API call to upload the file. Below is an example of the code that should be added to the **Test** section of the API call so that the upload-id can be captured and saved to a variable for subsequent API calls.
If you are using Postman, the API call above will generate an upload-id that will need to be captured so it can be used in the subsequent API call to upload the file. Below is an example of the code that should be added to the **Test** section of the API call so that the upload-id can be captured and saved to a variable for subsequent API calls.
.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion rseries_diagnostics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ The built-in terminal server will switch the connection to the appropriate tenan
.. code-block:: bash
FLD-ML-00054045:~ jmccarron$ ssh [email protected] -p 7001
prompt$ssh [email protected] -p 7001
[email protected]'s password:
Successfully connected to tenant1-1 console. The escape sequence is ^]
Expand Down

0 comments on commit 4771e3c

Please sign in to comment.